-
-
Notifications
You must be signed in to change notification settings - Fork 103
Expand file tree
/
Copy pathvitest.config.js
More file actions
38 lines (37 loc) · 1.13 KB
/
Copy pathvitest.config.js
File metadata and controls
38 lines (37 loc) · 1.13 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
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
globals: true,
environment: 'node',
// The heaviest suites boot the whole Express app (about 200 routes) or a
// real MCP server over an in-memory transport. Each passes comfortably on
// its own, but four of them sharing the fork pool starved each other and
// tripped a 30s hook timeout, which reads as a failure when it is only
// contention. The ceilings are generous so a genuine hang still fails,
// just later.
testTimeout: 60000,
hookTimeout: 120000,
include: ['tests/**/*.test.js'],
exclude: ['node_modules', 'dist', 'archive'],
reporters: ['verbose'],
// Cap worker processes: an uncapped fork pool on a loaded machine produced
// "Worker exited unexpectedly" crashes mid-suite.
pool: 'forks',
poolOptions: {
forks: {
maxForks: 4,
},
},
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
exclude: [
'node_modules/',
'tests/',
'archive/',
'scripts/',
'*.config.js',
],
},
},
});