-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathvitest.config.ts
More file actions
40 lines (38 loc) · 1.06 KB
/
Copy pathvitest.config.ts
File metadata and controls
40 lines (38 loc) · 1.06 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
import { defineConfig } from 'vitest/config';
const isCi = process.env.CI === 'true';
const workerCount = isCi ? 1 : 2;
const minWorkerCount = isCi ? 1 : 2;
export default defineConfig({
cacheDir: '.vitest',
test: {
setupFiles: ['./vitest.setup.ts'],
testTimeout: 30_000,
hookTimeout: 30_000,
maxConcurrency: workerCount,
// Keep local runs parallel while avoiding CI fork worker exits after test completion.
pool: isCi ? 'threads' : 'forks',
minWorkers: minWorkerCount,
maxWorkers: workerCount,
fileParallelism: !isCi,
silent: true,
// Many tests intentionally print status updates; Vitest buffers that
// output and can exhaust heap on large runs.
onConsoleLog: () => false,
exclude: [
'**/node_modules/**',
'**/dist/**',
'**/.worktrees/**',
'**/.claude/worktrees/**',
'**/.{idea,git,cache,output,temp}/**',
'tests/tuistory/**',
],
},
poolOptions: {
forks: {
execArgv: ['--max-old-space-size=8192'],
},
threads: {
singleThread: true,
},
},
});