-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathvitest.config.ts
More file actions
46 lines (38 loc) · 1.08 KB
/
vitest.config.ts
File metadata and controls
46 lines (38 loc) · 1.08 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
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
// Test environment
environment: 'node',
// Allow parallel execution for faster test runs
// Tests use isolated output directories, so they can run in parallel
fileParallelism: true,
// Limit concurrent test files to avoid overwhelming the system
maxConcurrency: 4,
// Use test isolation to prevent shared state issues
isolate: true,
// Include patterns
include: ['tests/**/*.test.ts'],
// Coverage configuration
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
include: ['src/**/*.ts'],
exclude: [
'src/**/*.d.ts',
'src/types/**',
'src/**/index.ts', // barrel files
'node_modules/**',
'dist/**',
'tests/**',
],
},
// Timeout for long-running E2E tests
testTimeout: 30000,
// Global setup - build once before all tests
globalSetup: ['./tests/setup.ts'],
// Reporter
reporters: ['verbose'],
// Globals
globals: true,
},
});