-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.config.ts
More file actions
46 lines (44 loc) · 1.08 KB
/
vitest.config.ts
File metadata and controls
46 lines (44 loc) · 1.08 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
46
import path from 'node:path';
import { defineConfig } from 'vitest/config';
import { config } from 'dotenv';
// Load test configuration if available (from containerized setup)
const testConfigPath = path.resolve(__dirname, '__tests__/generated-test-config.env');
try {
config({ path: testConfigPath });
} catch {
// Test config not available, that's fine for unit tests
}
export default defineConfig({
test: {
environment: 'node',
globals: true,
testTimeout: 60000,
exclude: ['**/e2e/**', '**/node_modules/**', '**/.bealers/**'],
setupFiles: ['__tests__/utils/test-setup.ts'],
coverage: {
provider: 'v8',
reporter: ['text', 'lcov', 'html'],
exclude: [
'node_modules/**',
'__tests__/**',
'**/*.test.ts',
'**/*.spec.ts',
'**/types/**',
'**/*.d.ts',
],
thresholds: {
global: {
statements: 80,
branches: 75,
functions: 80,
lines: 80,
},
},
},
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
});