-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvitest.config.ts
32 lines (31 loc) · 892 Bytes
/
vitest.config.ts
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
import { defineConfig } from 'vitest/config'
import path from 'node:path'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
test: {
root: '.',
include: ['tests/{unit,components}/**'],
exclude: ['node_modules/**', 'dist/**', '.{idea,fleet,vscode,git}/**', '*.config.*'],
watch: false,
environment: 'jsdom',
reporters: ['default', 'json', 'html'],
outputFile: {
json: './vitest-report/report.json',
html: './vitest-report/report.html',
},
coverage: {
provider: 'v8',
enabled: true,
reporter: ['text', 'json', 'html'],
reportsDirectory: './coverage-report',
include: ['src/**'],
exclude: ['*.{test,spec}.*'],
},
alias: {
'~': path.resolve(__dirname, '.'),
'@': path.resolve(__dirname, 'src'),
},
setupFiles: './vitest.setup.ts',
},
})