Repository navigation
Expand file tree
/
Copy pathstryker.conf.js
More file actions
38 lines (38 loc) · 1.46 KB
/
Copy pathstryker.conf.js
File metadata and controls
38 lines (38 loc) · 1.46 KB
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
/**
* StrykerJS, run by hand as `npm run test:mutation`. Not in CI and not a gate,
* like `npm run fallow`.
*
* Stryker 10's runner support stops at vitest 4.1, so against the installed 5.x
* it reports adapter failures as test failures. Install the older runner
* without saving it, run the pass, then restore the tree:
*
* npm i -D --no-save --legacy-peer-deps vitest@4
* npm run test:mutation
* npm ci
*/
export default {
$schema: "./node_modules/@stryker-mutator/core/schema/stryker-schema.json",
testRunner: "vitest",
// Its own config, because vite.config.ts declares a browser project whose
// provider pulls a package the 4.x runner cannot load.
vitest: { configFile: "vitest.stryker.config.ts" },
// Mirrors the coverage `exclude` array in vite.config.ts. Keep the two in
// step; nothing checks that they agree.
mutate: [
"src/**/*.{ts,tsx}",
"!src/**/*.test.{ts,tsx}",
"!src/**/*.test-d.ts",
"!src/test/**",
"!src/**/*.d.ts",
// Translations are copy no test asserts, and none should: that would pin
// the translator's wording in a test file. Left in, they were most of the
// survivors.
"!src/i18n/catalogs/**",
// Instrumentation calls helpers outside bootDocument, which breaks its
// serialized form in the global-scope test.
"!src/bootDocument.ts",
],
// Only the tests that reach a mutant run for it. Without it every mutant pays
// for the whole suite.
coverageAnalysis: "perTest",
};