jimivdw / grunt-mutation-testing

JavaScript Mutation Testing as grunt plugin. Tests your tests by mutating the code.
MIT License
50 stars 11 forks source link

Suggestions regarding some low-value mutations #18

Closed nene closed 9 years ago

nene commented 9 years ago

Hi! Thanks for an amazing tool. It's been fun to put my tests on a test.

I found that some of the mutations almost always produce false positives:

Very rarely will these mutations produce a test failure. Like in my code base all files begin with "use strict" - so as a result I almost never get 100% mutation success rate. And whether == or != produces a failure is a moot point for me, as the coding standards require to always use triple-equals.

I think both of these mutations are better detected with code style checking tools.

For the triple-equals case I found a quick hack to turn it off. But so far I haven't quite managed to get rid of the "use strict" case.

paysdoc commented 9 years ago

Hi Rene,

Thanks for your feedback. The triple equals were a bit of a contentious issue here too. I think we'll probably take that test out. As for the "use strict", I'll discuss with Jimi tomorrow whether and what we'll do about it. Have you tried adding ignore: [/use strict/] to the config?

nene commented 9 years ago

Hey, thanks. The ignore: option works perfectly for me.

jimivdw commented 9 years ago

Both these suggestions have been implemented in v1.1.0