-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.mjs
More file actions
37 lines (31 loc) · 968 Bytes
/
vitest.config.mjs
File metadata and controls
37 lines (31 loc) · 968 Bytes
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
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
// Use jsdom for DOM simulation
environment: 'jsdom',
// Test file patterns
include: ['__tests__/**/*.test.mjs'],
// Global test setup
setupFiles: ['__tests__/setup.mjs'],
// Coverage configuration
coverage: {
provider: 'v8',
reporter: ['text', 'html', 'lcov'],
include: ['core.*.mjs', 'util.*.mjs'],
exclude: ['**/*.test.mjs', '**/*.d.ts', 'modules/**'],
thresholds: {
// Enforce minimum coverage
lines: 70,
functions: 70,
branches: 60,
statements: 70
}
},
// Timeout for async tests
testTimeout: 10000,
// Run tests in sequence (some tests may share state)
sequence: {
shuffle: false
}
}
});