Example demo of using the Stryker mutation testing library in a node.js project with jest running the unit tests!
The word "mutation” in mutation testing is referring to a script that goes through each line of your source code and temporarily changes (ie. mutates) it in some way. Then the unit tests are run against each of these “mutant codebases”. We developers can then view the mutation testing output to become aware of the mutant cases where all tests still pass, and this pinpoints for us exact places in the code that we can add missing assertions for in our tests! 💡
This project was inspired by this great blog post by Alex Bunardzic on this topic!