Install @stryker-mutator/jest-runner locally within your project folder, like so:
The @stryker-mutator/jest-runner is a plugin for Stryker to enable Jest as a test runner. As such, you should make sure you have the correct versions of its dependencies installed:
For the minimum supported versions, see the peerDependencies section in the package.json.
Make sure you set the
testRunner option to "jest" and set
coverageAnalysis to "off" in your Stryker configuration.
The @stryker-mutator/jest-runner also provides a couple of configurable options using the
jest property in your Stryker config:
Configure where jest should get its configuration from.
"custom": use the
"create-react-app": use react-scripts, for projects created with create-react-app.
"create-react-app-ts": DEPRECATED use react-scripts-ts, for projects created with create-react-app-typescript. DEPRECATED, please follow the migration guide and move to
The path to your Jest config file.
Custom Jest config. This will override file-based config.
Whether to run jest with the
--findRelatedTests flag. When
true, Jest will only run tests related to the mutated file per test. (See --findRelatedTests).