valotas / karma-parcel

Karma with Parcel bundler
MIT License
6 stars 2 forks source link

Configure watch in parcelConfig #19

Open provegard opened 4 years ago

provegard commented 4 years ago

I typically run my tests from IDEA. However, the IDEA reporter disables autoWatch for some reason. The following code is in plugins/js-karma/js_reporter/karma-intellij/lib/intellij.conf.js:

disableSingleRun(config);
var originalAutoWatch = config.autoWatch;
config.autoWatch = false;
config.autoWatchBatchDelay = 0;

This means that if I change the code, I need to stop the Karma server before running the tests again.

It would be useful with a watch flag in parcelConfig that takes precedence over autoWatch.

I can prepare a PR if you agree.