CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 08:04:08 GMT
content-type: text/html; charset=utf-8
cache-control: max-age=0, private, must-revalidate
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com github.githubassets.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com marketplace-screenshots.githubusercontent.com/ copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
link: ; rel=preload; as=fetch; crossorigin=use-credentials
referrer-policy: no-referrer-when-downgrade
server-timing: issue_layout-fragment;desc="issue_layout fragment";dur=206.820657,issue_conversation_content-fragment;desc="issue_conversation_content fragment";dur=917.784341,nginx;desc="NGINX";dur=0.785577,glb;desc="GLB";dur=141.682519
strict-transport-security: max-age=31536000; includeSubdomains; preload
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With, Accept,Accept-Encoding, Accept, X-Requested-With
x-content-type-options: nosniff
x-frame-options: deny
x-voltron-version: aab62e3
x-xss-protection: 0
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=gMJocvRg5Os72oIOyzAtdCjMArM7yjLB7k62ycca4Vhi%2B%2F5wiFfTngvUlUKNpPxgsUOyS0PfmN5Kriswz3spjIHufTUVpZ2g%2Bt%2FEhE4NpuBWyzWkBpKnTQPjygKvS5oIqjGkn2TEHY7jOlMI1oXHdFAeN5y1QkkIcz4lLo7smHvAThriVUtgcHiNZ2NP3EAgQGrMZdJ6hhyBqzI9OxuocPaGlrxK%2BNNjkWsdUhXqjH7WYN47mbbpcU4ut9RVHN7SV46ZkpKRKTQ4voJzcz9ELA%3D%3D--9%2BpvUsI8d6tlvw0t--PmilBZNWUKi%2FJl55OCHjxg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.74602224.1760256247; Path=/; Domain=github.com; Expires=Mon, 12 Oct 2026 08:04:07 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Mon, 12 Oct 2026 08:04:07 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: DE44:3B926C:D3C34F:11C01D1:68EB60F7
Reporter writes spec results out of order · Issue #3211 · karma-runner/karma · GitHub
No one assignedNo typeNo projectsNo milestoneNone yetNo branches or pull requests
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
Expected behaviour
Reporter should see specs in the order they were defined. I have three groups of four tests which all pass:
first
√ 00
√ 01
√ 02
√ 03
second
√ 04
√ 05
√ 06
√ 07
third
√ 08
√ 09
√ 10
√ 11
Actual behaviour
Reporter sees specs out of order:
second
√ 05
√ 06
√ 07
third
√ 08
√ 09
√ 10
√ 11
first
√ 00
√ 01
√ 02
√ 03
second
√ 04
Environment Details
- Karma version (output of
karma --version
):Karma version: 3.1.1
- Relevant part of your
karma.config.js
file
module.exports = (config) => {
config.set({
// karma config
browsers: ['Chrome'],
colors: false,
logLevel: config.LOG_INFO,
singleRun: true,
// use jasmine
frameworks: ['jasmine'],
client: {jasmine: {random: false}},
// MRE
files: ['test.js'],
reporters: ['spec'],
})
};
Dump of test.js
:
'use strict';
let c = console.log;
let t = setTimeout;
describe('first', ()=>{
it('00', ()=>{c('start: 00'); c('end: 00');});
it('01', ()=>{c('start: 01'); c('end: 01');});
it('02', ()=>{c('start: 02'); c('end: 02');});
it('03', ()=>{c('start: 03'); c('end: 03');});
});
describe('second', () => {
it('04', (d)=>{c('start: 04'); t(()=>{c('end: 04'); d();}, 200);});
it('05', (d)=>{c('start: 05'); t(()=>{c('end: 05'); d();}, 200);});
it('06', (d)=>{c('start: 06'); t(()=>{c('end: 06'); d();}, 100);});
it('07', (d)=>{c('start: 07'); t(()=>{c('end: 07'); d();}, 100);});
// it('04', ()=>{c('start: 04'); c('end: 04');});
// it('05', ()=>{c('start: 05'); c('end: 05');});
// it('06', ()=>{c('start: 06'); c('end: 06');});
// it('07', ()=>{c('start: 07'); c('end: 07');});
});
describe('third', ()=>{
it('08', ()=>{c('start: 08'); c('end: 08');});
it('09', ()=>{c('start: 09'); c('end: 09');});
it('10', ()=>{c('start: 10'); c('end: 10');});
it('11', ()=>{c('start: 11'); c('end: 11');});
});
I am using karma-spec-reporter
, but have reduced it to a bare minimum and still reproduce the problem:
var SpecReporter = function (baseReporterDecorator, formatError, config) {
baseReporterDecorator(this);
this.failures = [];
this.onRunComplete = function (){};
this.logFinalErrors = function (){};
this.writeSpecMessage = function (browser, result) {
var prefix;
if (result.success) {
prefix = 'OK';
} else if (result.skipped) {
prefix = '--';
} else {
prefix = 'KO';
}
var spec_name = result.suite.slice();
spec_name.push(result.description);
spec_name = spec_name.join(':');
var msg = prefix + ' ' + spec_name;
this.writeCommonMsg(msg + '\n');
};
this.onBrowserLog = function () {
this.write('LOG: %s\n', arguments[1]);
};
this.specSuccess = this.writeSpecMessage.bind(this);
this.specSkipped = this.writeSpecMessage.bind(this);
this.specFailure = this.writeSpecMessage.bind(this);
this.suppressErrorSummary = true;
this.showSpecTiming = true;
};
SpecReporter.$inject = ['baseReporterDecorator', 'formatError', 'config'];
module.exports = {
'reporter:testbug': ['type', SpecReporter]
};
Steps to reproduce the behaviour
- Copy contents of
test.js
andkarma.conf.js
- Install
karma-spec-reporter
- run
karma start
to reproduce - switch contents of describe
second
so all tests are synchronous, and note that order is now correct
Observations
- I only reproduce if some of the tests are asynchronous
- I have not tried without Jasmine (I do not have enough experience with Karma to do so)
- This is not related to Jasmine running tests in random order (reproduced with v2.6.1, and confirmed with log output that tests are run in expected order)
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Issue actions
You can’t perform that action at this time.