In my package.json:
"stryker": "0.15.3",
"stryker-api": "0.11.0",
"stryker-baseline-reporter": "1.1.0",
"stryker-html-reporter": "0.11.1",
"stryker-javascript-mutator": "0.2.2",
"stryker-mocha-framework": "0.7.0",
"stryker-mocha-runner": "0.10.0",
When I run stryker I get the following deprecation warning:
[WARN] ES5Mutator - DEPRECATED: The es5 mutator is deprecated and will be removed in the future. Please upgrade to the stryker-javascript-mutator (npm install --save-dev stryker-javascript-mutator) and set "mutator: 'javascript'" in your stryker.conf.js!
Which makes sense, but when I follow the instruction and add mutator: 'javascript' to my conf I get the error:
[ERROR] StrykerCli - an error occurred Error: Could not find a mutant-generator with name javascript, did you install it correctly (for example: npm install --save-dev stryker-javascript)?
at MutatorFactory.Factory.create (/Users/iegner/Code/highstreet/node_modules/stryker-api/src/core/Factory.js:43:19)
I fixed this by adding 'stryker-javascript-mutator' to the plugins list in conf.js
I'm not sure if this needs documenting a bit better.
Thanks for wanting to upgrade and giving feedback! This is not intented behavior.
Did you already have a plugins list in your stryker.conf.js before you upgraded?
Yes I did
I suppose it should say : did you install it correctly (for example: npm install --save-dev stryker-javascript-mutator) and add it to the plugins array in your stryker.conf.js?
That explains the error. If no plugins section is specified, stryker will load every module named stryker-* in your node_modules folder. If you want to overwrite that behavior, you can have a plugins section. More often than not, you don't have to overwrite the plugins and we don't suggest doing it because of this reason.
If we run stryker on stryker, we do need the plugins section because we want to load the modules from this repository instead of from npm so we can test features before releasing packages.
I would suggest adding a note to the deprecation warning telling you to add it to your plugins array if you have a plugins array. Would you agree with that?
Also, could you see if stryker works if you remove the plugins section from your stryker.conf.js?
Yes it does work with the plugins array removed
Most helpful comment
Yes it does work with the plugins array removed