-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvitest.config.mts
40 lines (39 loc) · 984 Bytes
/
vitest.config.mts
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 react from '@vitejs/plugin-react'
import magicalSvg from 'vite-plugin-magical-svg'
import { configDefaults, defineConfig } from 'vitest/config'
export default defineConfig({
plugins: [react(), magicalSvg({ target: 'react' })],
test: {
setupFiles: ['/config/test-setup.ts'],
environment: 'jsdom',
globals: true,
exclude: [...configDefaults.exclude, '__test__/e2e/*'],
css: {
modules: {
classNameStrategy: 'non-scoped',
},
},
coverage: {
reporter: ['text', 'html'],
include: ['**/*.ts?(x)'],
exclude: [
'node_modules/**',
'.storybook/**',
'context/*',
'config/*',
'**/*.d.ts',
'**/*.config.ts',
'**/*.spec.{ts,tsx}',
'**/*.stories.{ts,tsx}',
'pages/_app.tsx',
'pages/_document.tsx',
],
thresholds: {
branches: 100,
functions: 100,
lines: 100,
statements: 100,
},
},
},
})