-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathvitest.config.mjs
More file actions
41 lines (39 loc) · 1.24 KB
/
vitest.config.mjs
File metadata and controls
41 lines (39 loc) · 1.24 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
import { defineConfig } from 'vitest/config'
import path from 'path'
import { fileURLToPath } from 'url'
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
export default defineConfig({
test: {
globals: true,
environment: 'node',
// Process management improvements
testTimeout: 10000, // 10 second timeout
hookTimeout: 10000, // Hook processing timeout 10 seconds
teardownTimeout: 5000, // Teardown timeout 5 seconds
isolate: true, // Isolate between tests (prevent flaky parallel tests)
coverage: {
enabled: false, // Disable coverage by default
provider: 'v8',
reporter: ['text', 'json', 'html', 'lcov'],
reportsDirectory: './coverage',
clean: true, // Clear coverage files to prevent process residue
include: ['src/**/*.{js,ts,jsx,tsx}'],
exclude: [
'node_modules/**',
'dist/**',
'**/*.d.ts',
'**/*.config.*',
'**/mockData/**',
'**/__mocks__/**',
],
// No coverage thresholds set for boilerplate
// Set appropriate values for each project
},
},
resolve: {
alias: {
src: path.resolve(__dirname, './src'),
},
},
})