feat: 初始化考培练系统项目
- 从服务器拉取完整代码 - 按框架规范整理项目结构 - 配置 Drone CI 测试环境部署 - 包含后端(FastAPI)、前端(Vue3)、管理端 技术栈: Vue3 + TypeScript + FastAPI + MySQL
This commit is contained in:
47
frontend/vitest.config.ts
Normal file
47
frontend/vitest.config.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
/// <reference types="vitest" />
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import path from 'path'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, './src')
|
||||
}
|
||||
},
|
||||
test: {
|
||||
environment: 'jsdom',
|
||||
globals: true,
|
||||
setupFiles: ['./src/test/setup.ts'],
|
||||
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
||||
exclude: ['node_modules', 'dist', '.idea', '.git', '.cache'],
|
||||
coverage: {
|
||||
provider: 'v8',
|
||||
reporter: ['text', 'json', 'html'],
|
||||
exclude: [
|
||||
'node_modules/',
|
||||
'src/test/',
|
||||
'**/*.d.ts',
|
||||
'**/*.config.*',
|
||||
'**/coverage/**',
|
||||
'**/dist/**',
|
||||
'**/.{idea,git,cache,output,temp}/**'
|
||||
],
|
||||
thresholds: {
|
||||
global: {
|
||||
branches: 60,
|
||||
functions: 60,
|
||||
lines: 60,
|
||||
statements: 60
|
||||
}
|
||||
}
|
||||
},
|
||||
// 并行运行测试
|
||||
threads: true,
|
||||
// 测试超时时间
|
||||
testTimeout: 10000,
|
||||
// 钩子超时时间
|
||||
hookTimeout: 10000
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user