当我运行命令npx stryker run时,我可以生成一个Stryker报告,但是当我更新测试用例时,无法生成更新的报告。
$ 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.我的Stryker配置文件:
* @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发布于 2021-02-20 21:26:36
通过在stryker.config.js文件中添加下面的内容来解决这个问题
tempDirName:'strykerTmp',
https://stackoverflow.com/questions/66282810
复制相似问题