I am using Stryker for Mutation testing in React Application
When I Run the command npx stryker run
I am getting the following error
I am able to generate a Stryker report
but when I update the test cases unable to generate the updated report.
$ npx stryker run
12:41:27 (18244) INFO ConfigReader Using stryker.conf.js
12:41:28 (18244) INFO InputFileResolver Found 17 of 142 file(s) to be mutated.
12:41:28 (18244) INFO Instrumenter Instrumented 17 source file(s) with 932 mutant(s)
12:41:28 (18244) INFO ConcurrencyTokenProvider Creating 6 checker process(es) and 5 test runner process(es).
12:41:47 (18244) INFO DryRunExecutor Starting initial test run. This may take a while.
12:41:48 (18244) INFO DryRunExecutor Initial test run succeeded. Ran 0 tests in 1 second (net 0 ms, overhead 1130 ms).
12:41:48 (18244) ERROR Stryker No tests were executed. Stryker will exit prematurely. Please check your configuration.
My Stryker config file:
* @type {import('@stryker-mutator/api/core').StrykerOptions}
* @type {import('@stryker-mutator/typescript-checker').StrykerOptions}
*/
module.exports = {
_comment:
"This config was generated using 'stryker init'. Please see the guide for more information: https://stryker-mutator.io/docs/stryker/guides/react",
testRunner: 'jest',
mutate: [
'src/index.js',
'src/App.js',
],
reporters: ['progress', 'clear-text', 'html'],
coverageAnalysis: 'off',
jest: {
projectType: 'create-react-app',
},
checkers: ['typescript'],
tsconfigFile: 'tsconfig.json',
}; ````
[1]: https://i.stack.imgur.com/Hs8Tq.png
Solved the issue by adding below in the stryker.config.js file
tempDirName: 'strykerTmp',