This repository has been archived by the owner on May 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstryker.config.js
83 lines (72 loc) · 1.65 KB
/
stryker.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// Check out Stryker at: https://stryker-mutator.io/
import values from "./.values.cjs";
const {
cacheDir,
packagesCoverageExclusions,
packagesDir,
packagesExpr,
packagesList,
reportsDir,
srcDir,
tempDir,
testDirUnit,
testsDir,
testSuffix,
} = values;
const reportIdentifier = packagesList.length > 1 ? "_mixed" : packagesList[0];
const oldThreshold = [
// NOTE: It is not allowed to add new items to this list.
"language-css",
"language-html",
"language-js",
"mangler-html-attributes",
];
export default {
coverageAnalysis: "perTest",
inPlace: false,
mutate: [
`${packagesDir}/${packagesExpr}/${srcDir}/**/*.ts`,
`!**/${testsDir}/**/*.ts`,
...packagesCoverageExclusions.map((exclusion) => `!${exclusion}`),
],
testRunner: "mocha",
mochaOptions: {
config: ".mocharc.cjs",
spec: [
[
packagesDir,
packagesExpr,
"**",
testsDir,
testDirUnit,
`*.${testSuffix}.ts`,
].join("/"),
],
},
incremental: true,
incrementalFile: `${cacheDir}/mutation/${packagesList.join(",")}.json`,
timeoutMS: 25000,
timeoutFactor: 2.5,
disableTypeChecks: `${packagesDir}/${packagesExpr}/${srcDir}/**/*.ts`,
checkers: ["typescript"],
tsconfigFile: "tsconfig.build.json",
reporters: [
"clear-text",
"dashboard",
"html",
"progress",
],
dashboard: {
module: packagesList[0],
},
htmlReporter: {
fileName: `${reportsDir}/mutation/${reportIdentifier}/index.html`,
},
thresholds: {
high: 95,
low: 90,
break: oldThreshold.includes(packagesList[0]) ? 50 : 90,
},
tempDirName: `${tempDir}/stryker`,
cleanTempDir: true,
};