-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathvitest.config.ts
More file actions
29 lines (28 loc) · 921 Bytes
/
vitest.config.ts
File metadata and controls
29 lines (28 loc) · 921 Bytes
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
import { resolve } from 'node:path';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [react()],
test: {
globals: true,
environment: 'jsdom',
include: ['__tests__/**/*.test.{ts,tsx}'],
setupFiles: ['__tests__/setup.ts'],
coverage: {
include: ['src/**/*'],
exclude: ['**/*.d.ts', '**/*.stories.*', 'src/app/layout.tsx'],
thresholds: { branches: 70, functions: 70, lines: 70, statements: 70 },
reporter: ['json', 'html']
},
css: { modules: { classNameStrategy: 'non-scoped' } }
},
resolve: {
alias: {
'@/components': resolve(__dirname, 'src/components'),
'@/lib': resolve(__dirname, 'src/lib'),
'@/hooks': resolve(__dirname, 'src/hooks'),
'@/tests': resolve(__dirname, '__tests__'),
'@/mocks': resolve(__dirname, '__tests__/__mocks__')
}
}
});