When a test cannot be started by karma due to an error (for example, a syntax error), Karma complains of a warning:
INFO [karma]: Karma v0.12.31 server started at http://localhost:9876/ INFO [launcher]: Starting browser PhantomJS INFO [PhantomJS 1.9.8 (Linux)]: Connected on socket WT-AsaXZq4odkQe2DgZJ with id 10861626 WARN [web-server]: 404: /undefinedhttp%3A%2F%2Flocalhost%3A9876%2Fbase%2Ftests%2Funit%2Fjs%2Fspecs%2Fcore%2FDeviceSpec.js%3F1e346ab1ad6e6e9240be6a6d5effaaa8f0dd96d8/9/%22ReferenceError%3A%20Can't%20find%20variable%3A%20SYNTAXERROR%22
The last line is unescaped: "/undefinedhttp://localhost:9876/base/tests/unit/js/specs/core/DeviceSpec.js?1e346ab1ad6e6e9240be6a6d5effaaa8f0dd96d8/9/" ReferenceError: cannot find variableERNORTA "ORNTA"
Which is correct, since I inserted SYNTAXERROR somewhere in my test for this question.
So, the test is ignored, but since other tests are in order, Karma returns those tests that passed:
PhantomJS 1.9.8 (Linux): Executed 41 of 41 SUCCESS (0.354 secs / 0.016 secs) β echo $? 0
I want Karma to fail if it cannot complete all the tests (I donβt think for any reason not!).
I did not find any configuration variable to act this way.
I found a line where Karma prints the warning above, but I donβt understand why it is treated like 404 ...
Any idea to make karma fail when it cannot complete all the tests?
source share