-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.config.ts
More file actions
39 lines (36 loc) · 1.17 KB
/
Copy pathvitest.config.ts
File metadata and controls
39 lines (36 loc) · 1.17 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
/**
* This file is part of helpers4.
* Copyright (C) 2025 baxyz
* SPDX-License-Identifier: LGPL-3.0-or-later
*/
import { defineConfig } from 'vitest/config';
// When running under Stryker, testRunnerNodeArgs injects --harmony-temporal into
// the child process. Worker threads then inherit the V8 flag from the parent,
// so passing it again via execArgv triggers ERR_WORKER_INVALID_EXEC_ARGV in
// Node.js 24. Only set execArgv when the flag is not already present.
const execArgv = process.execArgv.includes('--harmony-temporal')
? undefined
: ['--harmony-temporal'];
export default defineConfig({
test: {
benchmark: {
exclude: ['**/.stryker-tmp/**'],
include: ['helpers/**/*.bench.ts']
},
coverage: {
exclude: ['helpers/**/*.{test,spec,bench,example,model}.ts', 'helpers/**/index.ts'],
include: ['helpers/**/*.ts'],
provider: 'v8',
reporter: ['text', 'json', 'json-summary', 'html', 'lcov'],
thresholds: {
branches: 100,
functions: 100,
lines: 100,
statements: 100
}
},
environment: 'happy-dom',
...(execArgv && { execArgv }),
include: ['helpers/**/*.{test,spec}.ts']
}
});