-
Notifications
You must be signed in to change notification settings - Fork 228
/
Copy pathvitest.config.mts
41 lines (40 loc) · 1021 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
41
import react from '@vitejs/plugin-react-swc';
import tsconfigPaths from 'vite-tsconfig-paths';
import { defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [tsconfigPaths(), react()],
test: {
coverage: {
all: true,
include: ['src/**/*.ts?(x)'],
exclude: [
'src/**/*.d.ts',
'src/types/**/*',
'src/reportWebVitals.ts',
'src/store/middlewares-dev.ts',
],
reporter: ['text', 'lcov'],
thresholds: {
statements: 90,
branches: 90,
functions: 90,
lines: 90,
},
provider: 'v8',
},
environment: 'jsdom',
globals: true,
server: {
deps: {
inline: ['@gilbarbara/components'],
},
},
setupFiles: [
'./test/__setup__/vitest.setup.ts',
'./test/__mocks__/gilbarbara__helpers.ts',
'./test/__mocks__/react-helmet-async.tsx',
'./test/__mocks__/react-inlinesvg.tsx',
'./test/__mocks__/react-router-dom.tsx',
],
},
});