Build not getting cancelled when webpack fails to compile the file
See original GitHub issueI am not really sure if this is an error with our configuration, karma, karma-webpack or webpack 😄
We are compiling cjsx (coffee and jsx) files using webpack and then run our tests using jasmine. Everything is working fine as long as you do not have a syntax error in your coffee file. At that point the tests just run using an outdated version of our code, which often means they just stay green 😃.
With webpack being quieted this does not result in any output and even if you output the error it can easily be overlooked because of the test run afterwards (which scrolls the error out of my terminal).
I would expect the tests to not be run and an error output to the displayed in karma.
Is this an issue that should be fixed here in the plugin or should this work out of the box and I am just too stupid to configure karma-webpack.
I already tried implementing this using failed callback of webpack. Is this the way to go here? I will try some more after work.
Issue Analytics
- State:
- Created 8 years ago
- Comments:23 (1 by maintainers)

Top Related StackOverflow Question
@d3viant0ne I don’t think this issue should be closed or is resolved. These plugins are workarounds. Tests should not run/pass if the code doesn’t build. If your using karma start it will fail to build, karma’s connection to the browser will timeout, and karma just sits there not exiting and not running tests.
I’ve created another plugin which also prevents Karma from hanging https://gist.github.com/mvgijssel/d3b121ad50e34c09a124