-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.config.ts
More file actions
56 lines (54 loc) · 1.39 KB
/
vitest.config.ts
File metadata and controls
56 lines (54 loc) · 1.39 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
47
48
49
50
51
52
53
54
55
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import path from 'node:path';
export default defineConfig({
plugins: [react()] as any,
test: {
globals: true,
environment: 'jsdom',
setupFiles: './src/test/setup.ts',
testTimeout: 20000,
hookTimeout: 20000,
exclude: ['node_modules', 'dist', 'sdk'],
coverage: {
provider: 'v8',
reportsDirectory: 'coverage-vitest',
reporter: ['lcov'],
exclude: [
'node_modules/',
'src/test/',
'**/__tests__/**',
'**/*.test.*',
'**/*.spec.*',
'**/__mocks__/**',
'**/*.d.ts',
'**/*.config.*',
'**/dist/**',
'src/coverage-vitest/**',
'src/types/**',
'src/**/types/**',
'**/*.tgz'
],
thresholds: {
lines: 40,
functions: 50,
branches: 40,
statements: 40
}
}
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@components': path.resolve(__dirname, './src/components'),
'@utils': path.resolve(__dirname, './src/utils'),
'@hooks': path.resolve(__dirname, './src/hooks'),
'@types': path.resolve(__dirname, './src/types'),
'@service': path.resolve(__dirname, './src/service'),
'@stores': path.resolve(__dirname, './src/stores')
}
},
optimizeDeps: {
exclude: ['sdk']
}
});