Windows 中的 Stryker Mutation 测试设置不是 运行 测试

Stryker Mutation testing setup in Windows is not running tests

我正在使用 Stryker 在 React 应用程序中进行突变测试 当我 运行 命令 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

通过在 stryker.config.js 文件中添加以下内容解决了问题

tempDirName: 'strykerTmp',