-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
30 lines (28 loc) · 824 Bytes
/
Copy pathvitest.config.ts
File metadata and controls
30 lines (28 loc) · 824 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
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vitest/config'
import vue from '@vitejs/plugin-vue'
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
// The PWA virtual module only exists inside a Vite build.
'virtual:pwa-register/vue': fileURLToPath(
new URL('./src/test/pwaRegisterStub.ts', import.meta.url),
),
},
},
test: {
globals: true,
environment: 'jsdom',
include: ['src/**/*.spec.ts'],
setupFiles: ['./src/test/setup.ts'],
restoreMocks: true,
coverage: {
provider: 'v8',
reporter: ['text', 'html', 'json'],
include: ['src/**/*.{ts,vue}'],
exclude: ['src/main.ts', 'src/test/**', 'src/**/*.spec.ts'],
},
},
})