-
-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathvitest.config.ts
More file actions
46 lines (45 loc) · 1.03 KB
/
vitest.config.ts
File metadata and controls
46 lines (45 loc) · 1.03 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
41
42
43
44
45
46
import react from '@vitejs/plugin-react-swc'
import path from 'node:path'
import {defineConfig} from 'vitest/config'
/**
* Vitest Configuration.
*
* @see https://vitejs.dev/config/
*/
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './')
}
},
test: {
environment: 'jsdom',
globals: true,
setupFiles: './vitest.setup.ts',
environmentOptions: {
jsdom: {
url: 'http://localhost:3000'
}
},
exclude: [
'**/.{idea,git,cache,output,temp}/**',
'**/dist/**',
'**/node_modules/**',
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*'
],
coverage: {
enabled: true,
provider: 'v8',
include: ['**/*.{ts,tsx}'],
exclude: [
'**/*.config.*',
'**/*.d.ts',
'**/*.{spec,test}.{ts,tsx}',
'**/{codegen,generated}.ts',
'**/{scripts,test-utils,types}/**'
],
reporter: ['text', 'json', 'html', 'lcov']
}
}
})