I'm currently trying to implement jasmine testing using karma and webpack, and the code is getting transpiled incorrectly, but I can't see what it is transpiled down to because the browser closes as soon as it opens and finds the syntax error. How can I configure karma or jasmine to keep the browser window open after an error occurs?
2
-
1--single-run should do the trick for you, or { singleRun: false } in karma.conf.js – Anatoli Klamer Mar 2 '17 at 19:36
-
@zxxc when I set singleRun to false, it opens the browser window and doesn't seem to load the tests. – James Gould Mar 2 '17 at 19:40
Add a comment
|
You want to call it with --single-run=false
.
Try following this article: https://glebbahmutov.com/blog/debugging-karma-unit-tests/
-
This started working today, but it was not running the tests with this yesterday. Maybe restarting my computer affected the change? – James Gould Mar 4 '17 at 0:45
-
If the option is not good enough for you: Try using Gulp plus Karma APIs browsers_change event: stackoverflow.com/questions/45352256/… – Stefan Jul 28 '17 at 13:58
-
5
-
for the unknown option error, check stackoverflow.com/questions/50816917/… – Manu Chadha Oct 13 '20 at 5:57