-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
64 lines (63 loc) · 1.86 KB
/
vitest.config.ts
File metadata and controls
64 lines (63 loc) · 1.86 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
56
57
58
59
60
61
62
63
64
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import path from 'path';
export default defineConfig({
plugins: [react()],
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/test/setup.ts'],
include: ['src/**/*.{test,spec}.{ts,tsx}', 'scripts/**/*.{test,spec}.{ts,tsx}'],
exclude: [
'node_modules',
'dist',
'src/api/generated/**',
'e2e/**',
],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
reportsDirectory: './coverage',
include: ['src/**/*.{ts,tsx}'],
exclude: [
'node_modules/**',
'e2e/**',
'src/api/generated/**',
'src/test/**',
'**/*.d.ts',
'**/*.test.ts',
'**/*.test.tsx',
'**/*.spec.ts',
'**/*.spec.tsx',
'src/main.tsx',
'src/app/App.tsx',
'src/app/routes.tsx',
'src/config/**',
'*.config.*',
'eslint-plugins/**',
],
thresholds: {
global: {
statements: 50,
branches: 50,
functions: 50,
lines: 50,
},
},
},
},
resolve: {
alias: {
'virtual:pwa-register/react': path.resolve(__dirname, './src/test/mocks/pwa-register-react.ts'),
'@': path.resolve(__dirname, './src'),
'@components': path.resolve(__dirname, './src/components'),
'@features': path.resolve(__dirname, './src/features'),
'@stores': path.resolve(__dirname, './src/stores'),
'@utils': path.resolve(__dirname, './src/utils'),
'@api': path.resolve(__dirname, './src/api'),
'@localization': path.resolve(__dirname, './src/localization'),
'@styles': path.resolve(__dirname, './src/styles'),
'@config': path.resolve(__dirname, './src/config'),
},
},
});