I am using Karma through Grunt. We have around 1000 tests and it is a bit painful to have them all run whenever we change a file (autoWatch = true
).
This is what we are doing now:
- Start Karma with
singleRun=false, autoWatch=false
. - Open the debug page and grep for a specific suite (using mocha html reporter).
- Change a test or file related to that suite.
- Refresh the debug page to run the set of tests again.
- My changes in (3) haven't been picked up by Karma so the tests still behave as if nothing had changed.
This is what I need:
- Start Karma with
singleRun=false, magicOption=true
. - Open the debug page and grep for a specific suite (using mocha html reporter).
- Change a test or file related to that suite.
- Refresh the debug page to run the set of tests again.
- My changes are porperly picked up and only the grepped tests are run.
If I set autoWatch=true
I get what I need but the whole suite of 1000 tests is run in the background whenever I change a file, which soon collapses my environment.
I don't think there is anything equivalent to magicOption
according to Karma docs but, is there any way to achieve the same behaviour?
Thanks a lot.
Aucun commentaire:
Enregistrer un commentaire