0

アプリケーションのミューテーション テストを実行しようとしていますが、stryker mutator を実行すると、どのテストも分析に使用されず、ドライ ランが実行されます。

WARN InputFileResolver Glob pattern "src/**/*.ts" did not result in any files.
(10452) WARN InputFileResolver Glob pattern "!src/**/*.spec.ts" did not exclude any files.
(10452) WARN InputFileResolver Glob pattern "!src/test.ts" did not exclude any files.
(10452) WARN InputFileResolver Glob pattern "!src/environments/*.ts" did not exclude any files.
(10452) WARN InputFileResolver No files marked to be mutated, Stryker will perform a dry-run without actually mutating anything. You can configure the `mutate` property in your config file (or use `--mutate` via command line)

ご覧のとおり、glob パターンを正しく宣言しましたが、完全なストライカー構成は次のとおりです。

/**
 * @type {import('@stryker-mutator/api/core').StrykerOptions}
 */
module.exports = {
  _comment:
    "This config was generated using 'stryker init'. Please see the guide for more information: https://stryker-mutator.io/docs/stryker-js/guides/angular",
  mutate: [
    "src/**/*.ts",
    "!=src/**/*.spec.ts",
    "!src/test.ts",
    "!src/environments/*.ts",
  ],
  testRunner: "jest",
  "jest": {
    "projectType": "custom",
    "configFile": "jest.config.js",
    "config": {
      "testEnvironment": "jest-environment-jsdom-sixteen"
    },
    "enableFindRelatedTests": true,
  },
  reporters: ["progress", "clear-text", "html"],
  concurrency: 4,
  concurrency_comment:
    "Recommended to use about half of your available cores when running stryker with angular",
  coverageAnalysis: "perTest",
};
4

1 に答える 1