-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvitest.config.js
More file actions
49 lines (41 loc) · 935 Bytes
/
vitest.config.js
File metadata and controls
49 lines (41 loc) · 935 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
38
39
40
41
42
43
44
45
46
47
48
49
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
// Use single fork to avoid worker-related issues with mocking
pool: 'forks',
poolOptions: {
forks: {
singleFork: true,
},
},
// Test file patterns
include: ['tests/**/*.test.js', 'tests/**/*.spec.js'],
// Setup files
setupFiles: ['tests/setup.js'],
// Environment
environment: 'node',
// Coverage configuration
coverage: {
provider: 'v8',
reporter: ['text', 'html', 'lcov'],
reportsDirectory: 'tests/coverage',
include: ['src/**/*.js'],
exclude: ['src/**/*.test.js', 'src/**/*.spec.js', 'tests/**/*', 'node_modules/**/*'],
thresholds: {
global: {
branches: 50,
functions: 50,
lines: 50,
statements: 50,
},
},
},
// Timeout settings
testTimeout: 30000,
hookTimeout: 30000,
// Reporter
reporter: ['verbose'],
// Globals
globals: false,
},
});