我正在尝试为我的应用程序进行突变测试,但是当我运行我的 stryker 突变器时,它不会将任何测试纳入分析并执行空运行。
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 模式,但这是完整的 stryker 配置:
/**
* @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",
};