question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Javascript Mutator not found

See original GitHub issue

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)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
webdeviancommented, Nov 27, 2017

Yes it does work with the plugins array removed

1reaction
simondelcommented, Nov 27, 2017

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Stryker JavaScript mutator - npm
A mutator that supports JavaScript for Stryker, the JavaScript Mutation testing framework. This plugin does not transpile any code.
Read more >
Mutator in tabulator not working on same edited functions
This is happening because the mutator functions are called only when their field is updated, each individual function is not aware if it ......
Read more >
JavaScript array methods: Mutator VS Non-mutator and the ...
In this post, I will lead you through mutator and non-mutator array methods and their returning value. Notice this article is not an ......
Read more >
JavaScript mutator methods - Educative.io
In JavaScript, arrays are list-like objects whose prototype has functions ... The shift method takes no argument and removes the first element in...
Read more >
How To Use Array Methods in JavaScript: Mutator Methods
Tutorial Series: Working with Arrays in JavaScript ... If the object is not an array, this method returns false .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found