-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.config.ts
More file actions
45 lines (44 loc) · 1.09 KB
/
vitest.config.ts
File metadata and controls
45 lines (44 loc) · 1.09 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
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
environment: 'node',
include: ['src/**/*.{test,spec}.ts'],
exclude: [
'functions/**',
'node_modules/**',
'dist/**',
'lib/**',
// common generated or cache dirs
'.genkit/**',
'.next/**',
'coverage/**',
],
globals: true,
reporters: [
'default',
['json', { outputFile: 'tests/test-results.json' }],
],
// Increase timeouts for flows/tools that may perform async work
testTimeout: 20000,
hookTimeout: 20000,
// Run in Node worker threads (default), explicit for clarity
pool: 'threads',
coverage: {
enabled: true,
reporter: ['text', 'lcov'],
include: ['src/**/*.{ts,tsx}'],
exclude: ['src/index.ts', 'src/**/*.d.ts', 'src/**/index.ts'],
all: false,
provider: 'v8',
thresholds: {
lines: 0.6,
functions: 0.6,
branches: 0.5,
statements: 0.6,
},
},
restoreMocks: true,
clearMocks: true,
setupFiles: ['vitest.setup.ts'],
},
});