Reporter's onSpecComplete is called after onRunComplete
See original GitHub issueReproduced on this test.js:
function wait(millis) {
var startTime = new Date().getTime();
while (new Date().getTime() < startTime + millis) {}
}
describe("suite", function () {
it("wait 1 sec", function () {
wait(1000);
});
it("wait 11 sec", function () {
wait(11000);
});
it("wait 1 sec again", function () {
wait(1000);
});
});
Test wait 11 sec
takes 11 sec to execute, so the browser is disconnected:
WARN [Chrome 38.0.2125 (Linux)]: Disconnected (1 times), because no message in 10000 ms.
The problem is that, for some reason, onSpecComplete
is called after onRunComplete
.
Is it expected or a bug?
Issue Analytics
- State:
- Created 9 years ago
- Reactions:1
- Comments:9 (3 by maintainers)
Top Results From Across the Web
How to Create a Custom Karma Reporter - ironSource
This reporter will do the following things: write “Hello Word” when the execution starts; write “Hello ” + browser name when starting to...
Read more >Initial import · 8b4416c7aa - karma-subunit-reporter - OpenDev ...
karma-subunit-reporter - A karma plugin to report Karma test results as a subunit stream. ... onSpecComplete = function(browser, result) {.
Read more >Angular Unit testing : can't change the reporter of karma
I am trying to use the JUnit reporter with karma. When I launch $ ng test --watch=false --code-coverage. It always outputs me
Read more >Code coverage report for node-npmtest-karma-mocha-reporter ...
maxLogLines = 999; } // check if mocha is installed when showDiff is enabled if (config. ... the onRunComplete() method is called twice...
Read more >JavaScript Test Runner - UNPKG
name or calling a non existing method on an object - developers have to ... Tests prove whether the code still works, even...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Still seeing it here - karma@1.2.0 and karma-junit-reporter@1.1.0
This should be fixed by https://github.com/karma-runner/karma/commit/9c894f9eab19945b2c4355874d63854eb1c8ede7