-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.js
More file actions
24 lines (23 loc) · 658 Bytes
/
vitest.config.js
File metadata and controls
24 lines (23 loc) · 658 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
import { defineConfig } from 'vitest/config';
import { loadEnv } from 'vite';
export default defineConfig(({ mode }) => ({
test: {
globals: false, // Don't auto-inject globals (keep explicit imports)
environment: 'node',
testTimeout: 10000, // Default timeout
hookTimeout: 10000,
include: ['__tests__/**/*.test.js'],
env: loadEnv(mode, process.cwd(), ''), // Load .env file
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
reportsDirectory: './coverage',
exclude: [
'node_modules/',
'__tests__/',
'*.config.js',
'src/healthcheck.js'
]
}
}
}));