20260819173221

This commit is contained in:
oneao committed 2026-08-19 17:32:25 +08:00
1 parent 1ffc8e1ac9
commit a0a4273f4c
326 files changed
+301646 -2314

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
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)),
},
},
test: {
environment: 'jsdom',
globals: true,
setupFiles: ['./tests/setup.js'],
css: false,
coverage: {
provider: 'v8',
reporter: ['text', 'html'],
// 只统计源码,排除入口、主题预设等纯常量文件
include: ['src/**/*.{js,vue}'],
exclude: ['src/main.js', 'src/theme/presets.js'],
// 60% 起步门槛:AI 全权测试时用 pnpm test:coverage 检查缺口;
// 普通 pnpm test 不应用阈值(vitest 仅在 --coverage 下检查 thresholds)
thresholds: {
lines: 60,
functions: 60,
branches: 60,
statements: 60,
},
},
},
})