video-compliance-ai/frontend/vitest.config.ts
Your Name e4959d584f feat: 完善代理商端业务逻辑与前后端框架
主要更新:
- 更新代理商端文档,明确项目由品牌方分配流程
- 新增Brief配置详情页(已配置)设计稿
- 完善工作台紧急待办中品牌新任务功能
- 整理Pencil设计文件中代理商端页面顺序
- 新增后端FastAPI框架及核心API
- 新增前端Next.js页面和组件库
- 添加.gitignore排除构建和缓存文件

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 19:27:31 +08:00

48 lines
1.3 KiB
TypeScript

import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import path from 'path';
export default defineConfig({
plugins: [react()],
test: {
environment: 'jsdom',
globals: true,
setupFiles: ['./vitest.setup.ts'],
include: ['**/*.{test,spec}.{ts,tsx}'],
exclude: ['**/node_modules/**', '**/e2e/**'],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html', 'lcov'],
reportsDirectory: './coverage',
thresholds: {
global: {
branches: 70,
functions: 70,
lines: 70,
statements: 70,
},
},
exclude: [
'**/node_modules/**',
'**/*.d.ts',
'**/types/**',
'**/index.ts',
'**/*.config.*',
'**/vitest.setup.ts',
'**/constants/**', // 常量文件无需测试
],
},
},
resolve: {
alias: {
'@': path.resolve(__dirname, './'),
'@/components': path.resolve(__dirname, './components'),
'@/constants': path.resolve(__dirname, './constants'),
'@/styles': path.resolve(__dirname, './styles'),
'@/lib': path.resolve(__dirname, './lib'),
'@/hooks': path.resolve(__dirname, './hooks'),
'@/types': path.resolve(__dirname, './types'),
},
},
});