stryker-diff-runner
v2.3.11
Published
An utility script that runs Stryker mutation testing on files diff between current git working branch and default one.
Downloads
136
Readme
Stryker diff runner
This module provide a stryker runner that allow to run mutation testing only on files diff with default branch.
Getting started
Prerequisites
You will need the following things properly installed on your computer :
Installation
This module required @stryker-mutator/core >=3 on your project to work. Install it and these dependencies like so :
$ npm add @stryker-mutator/core stryker-diff-runnerIf you want to use this module with an older version of Stryker, you can install the v1 package :
$ npm add @stryker-mutator/core@2 @stryker-mutator/api@2 stryker-diff-runner@1Usage
Add a NPM script to run Stryker mutation testing through the diff runner
{
// ...
"scripts": {
// ...
"test:mutation:diff": "stryker-diff-runner"
}
}All stryker command arguments can be passed to the diff runner.
Custom commands
By default stryker-diff-runner performs a comparison with the master branch and looks for the file stryker.conf.js in the root directory.
To change these settings include the --branch and --path commands. Check the example below:
{
// ...
"scripts": {
// ...
"test:mutation:diff": "stryker-diff-runner --path test/stryker.conf.js --branch main"
}
}Development
In order to contribute and be able to start developing on the project, you will have to follow following steps :
$ git clone <repository>
$ cd <repository>
$ npm installRunning tests
npm run test
Building
npm run build

