karma-jspm
karma-jspm copied to clipboard
Need to watch for file updates (running karma from WebStorm)
After some trial and error, I can now run test on command line and WebStorm (horay!)
But there is one problem. Since WebStorm will keep the karma running, when I make a change to the code (adding a test for example), jspm does not pickup the change. When I run the test, the cached version is used. I have to stop the karma server and run it again so jspm could pick it up.
This work flow is working fine for karma-requirejs
.
I am running with singleRun: false in karma.conf.js and the tests are re-executed every time a file is changed.
@kubawalinski: You're sure about this? singleRun: false
does not solve the problem for me. Changing some test code is not reflected e.g. Karma is serving the "cached" version. Any hints?
Reading about a similar problem at https://github.com/nikku/karma-browserify/issues/23 there might be a bug on WebStorms side: https://youtrack.jetbrains.com/issue/WEB-12496. (See also #38.)
I can second that cli karma start
works but the (in my case IntelliJ IDEA 15) version does not
If you add this to your karma.conf.js
:
files: [
{pattern: 'js/**/*.js', included: false}
],
It works for me in WebStorm. I guess the WebStorm karma plugin does watch itself but only watches globs in files
. Not jspm.serveFiles
.
Thanks sod,
I was having that problem with intellij 15, and your solution worked perfectly.
files: [ {pattern: 'test/unit/js/app/**/*.js', included: false}, {pattern: 'src/js/app/**/*.js', included: false} ]