-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.js
More file actions
34 lines (33 loc) · 882 Bytes
/
vitest.config.js
File metadata and controls
34 lines (33 loc) · 882 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
30
31
32
33
34
import { defineConfig } from 'vitest/config'
import vue from '@vitejs/plugin-vue'
import { fileURLToPath } from 'node:url'
export default defineConfig({
define: {
__DEV__: true,
__TEST__: true,
__BROWSER__: true,
__USE_DEVTOOLS__: false,
},
plugins: [vue()],
test: {
include: ['src/**/*.{test,spec}.ts', 'tests/**/*.{test,spec}.ts'],
setupFiles: [
fileURLToPath(new URL('./tests/vitest-setup.ts', import.meta.url)),
],
environment: 'happy-dom',
typecheck: {
enabled: true,
tsconfig: 'tsconfig.json',
include: ['src/**/*.{test,spec}.ts', 'tests/**/*.{test,spec}.ts'],
},
mockReset: true,
coverage: {
enabled: true,
provider: 'v8',
reporter: ['text', 'lcovonly', 'html'],
all: true,
include: ['src/**/*', 'tests/**/*.vue'],
exclude: ['tests/**/*.ts'],
},
},
})