-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.mts
More file actions
40 lines (38 loc) · 1.02 KB
/
vitest.config.mts
File metadata and controls
40 lines (38 loc) · 1.02 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
import path from 'path';
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@features': path.resolve(__dirname, './src/features'),
'@shared': path.resolve(__dirname, './src/shared'),
'@test': path.resolve(__dirname, './test'),
},
},
test: {
environment: 'happy-dom',
globals: true,
pool: 'threads',
setupFiles: ['./test/setup.ts'],
include: ['test/**/*.test.ts', 'test/**/*.test.tsx', 'src/**/*.test.ts', 'src/**/*.test.tsx'],
deps: {
optimizer: {
web: { enabled: true },
},
},
coverage: {
provider: 'v8',
reporter: ['text', 'text-summary', 'html'],
include: ['src/**/*.ts', 'src/**/*.tsx'],
exclude: [
'src/**/*.test.ts',
'src/**/*.test.tsx',
'src/**/index.ts',
'node_modules/**',
],
reportsDirectory: './coverage',
},
},
});