- 从服务器拉取完整代码 - 按框架规范整理项目结构 - 配置 Drone CI 测试环境部署 - 包含后端(FastAPI)、前端(Vue3)、管理端 技术栈: Vue3 + TypeScript + FastAPI + MySQL
48 lines
1.1 KiB
TypeScript
48 lines
1.1 KiB
TypeScript
/// <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
|
|
}
|
|
})
|