Files
novalon-manage-system/novalon-manage-web/vitest.config.ts
T
张翔 d03253617c feat(web): 迁移前端配置文件(任务 T4.2)
- 替换 package.json,适配项目名 novalon-manage-web
- 替换环境配置文件 .env.example、.env.test
- 替换 vite.config.ts
- 替换 tsconfig.json、tsconfig.node.json
- 替换 vitest.config.ts
2026-04-27 15:00:43 +08:00

46 lines
980 B
TypeScript

import { defineConfig } from 'vitest/config'
import vue from '@vitejs/plugin-vue'
import { fileURLToPath } from 'node:url'
export default defineConfig({
plugins: [vue()],
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/__tests__/setup.ts'],
include: [
'src/__tests__/**/*.{test,spec}.{js,ts,jsx,tsx}'
],
// 明确排除E2E测试文件
exclude: [
'node_modules/',
'dist/',
'e2e/**/*.spec.ts',
'**/*.d.ts',
'**/*.config.*',
'**/mockData',
],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html', 'lcov'],
exclude: [
'node_modules/',
'src/__tests__/',
'**/*.d.ts',
'**/*.config.*',
'**/mockData',
'e2e/',
],
lines: 80,
functions: 80,
branches: 80,
statements: 80,
},
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
})