-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.stryker.config.ts
More file actions
53 lines (51 loc) · 1.53 KB
/
Copy pathvitest.stryker.config.ts
File metadata and controls
53 lines (51 loc) · 1.53 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import { defineConfig } from "vitest/config";
/**
* Vitest configuration used exclusively by Stryker mutation testing.
*
* @remarks
* This profile intentionally disables file parallelism and forces a single
* worker to keep mutant execution deterministic and resource-bounded.
*/
const strykerVitestConfig: ReturnType<typeof defineConfig> = defineConfig({
test: {
css: false,
dangerouslyIgnoreUnhandledErrors: false,
env: {
NODE_ENV: "test",
},
environment: "node",
exclude: ["test/fixtures/**", "docs/**"],
expect: {
poll: { interval: 50, timeout: 15_000 },
requireAssertions: false,
},
fakeTimers: {
advanceTimeDelta: 20,
loopLimit: 10_000,
now: Date.now(),
shouldAdvanceTime: false,
shouldClearNativeTimers: true,
},
fileParallelism: false,
globals: true,
include: ["test/**/*.{test,spec}.ts"],
isolate: true,
maxWorkers: 1,
name: {
color: "yellow",
label: "Stryker",
}, // Custom project name and color for Stryker test runs
pool: "threads",
printConsoleTrace: false,
retry: 0,
sequence: {
concurrent: false,
groupOrder: 0,
setupFiles: "parallel",
},
setupFiles: ["./test/_internal/vitest-setup.ts"],
slowTestThreshold: 300,
testTimeout: 15_000,
},
});
export default strykerVitestConfig;