-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathvitest.config.ts
More file actions
39 lines (38 loc) · 1014 Bytes
/
Copy pathvitest.config.ts
File metadata and controls
39 lines (38 loc) · 1014 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
35
36
37
38
39
/// <reference types="vitest/config" />
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { fileURLToPath, URL } from 'node:url'
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
define: {
__APP_VERSION__: JSON.stringify('test'),
__BUILD_DATE__: JSON.stringify('2026-05-15'),
__BUILD_TIME__: JSON.stringify('2026-05-15 12:00:00'),
__GIT_HASH__: JSON.stringify('testhash'),
__GIT_BRANCH__: JSON.stringify('main'),
},
test: {
globals: true,
environment: 'jsdom',
include: ['src/**/*.{test,spec}.{ts,js}'],
css: true,
setupFiles: ['./src/__tests__/setup.ts'],
coverage: {
provider: 'v8',
include: ['src/**/*.{ts,vue}'],
exclude: [
'src/**/*.d.ts',
'src/auto-imports.d.ts',
'src/components.d.ts',
'src/main.ts',
'src/vite-env.d.ts',
'src/env.d.ts',
],
},
},
})