forked from chris-schra/mcp-funnel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
44 lines (42 loc) · 1.22 KB
/
vitest.config.ts
File metadata and controls
44 lines (42 loc) · 1.22 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
import { defineConfig } from 'vitest/config';
import tsconfigPaths from 'vite-tsconfig-paths';
// force vitest to use CI mode to avoid watch mode
process.env.CI = 'true';
export default defineConfig({
// @ts-expect-error type mismatch in packages
plugins: [tsconfigPaths()],
test: {
globals: true,
environment: 'node',
// Use forks pool with reasonable concurrency limits
// This prevents process explosion from nested vitest sessions
pool: 'forks',
poolOptions: {
forks: {
singleFork: false,
maxForks: 8, // Max 8 test files in parallel (reasonable for multi-core)
},
},
// Limit concurrent tests within each file (prevents nested vitest explosion)
maxConcurrency: 5,
// Exclude fixture test files from being run as actual tests
exclude: ['**/test/fixtures/**', '**/node_modules/**'],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
exclude: [
'node_modules/',
'**/test/*',
'src/cli.ts',
'**/*.test.ts',
'**/build.ts',
'**/build/*',
'**/dist/*',
'**/.react-router/*',
'**/*.config.ts',
],
},
testTimeout: 10000,
hookTimeout: 10000,
},
});