c670b9e454
- 确定性领域引擎(分类/评分/分级/红线/费用/裁决)+LLM(通义千问)语言理解 - 6步评估向导、服务端草稿持久化(跨设备/编辑草稿保护) - 工作流(草稿→风控→管理层)、RBAC、报告导出、校准、客户/费率/红线/最低工资管理 - 专业图标体系替换全部emoji、看板美化 - 生产化:API_BASE可配置(同源反代)、auth密钥惰性读取修复RBAC - 444单测+204前端测试+51 e2e
37 lines
1.2 KiB
TypeScript
37 lines
1.2 KiB
TypeScript
import { defineConfig } from 'vitest/config';
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
test: {
|
|
globals: true,
|
|
// Default environment is node so the existing domain tests under src/ keep
|
|
// running exactly as before. Web/UI tests are switched to jsdom per-glob.
|
|
environment: 'node',
|
|
environmentMatchGlobs: [
|
|
['web/**', 'jsdom'],
|
|
['**/*.tsx', 'jsdom'],
|
|
],
|
|
include: [
|
|
'src/**/*.{test,spec}.ts',
|
|
'web/**/*.{test,spec}.{ts,tsx}',
|
|
],
|
|
// Both setup files are registered globally. The src setup only configures
|
|
// fast-check; the web setup additionally registers DOM/axe matchers and RTL
|
|
// cleanup — harmless to load in node since the matchers are only invoked by
|
|
// jsdom tests.
|
|
setupFiles: ['src/__tests__/setup.ts', 'web/src/__tests__/setup.ts'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reportsDirectory: './coverage',
|
|
include: ['src/**/*.ts', 'web/src/**/*.{ts,tsx}'],
|
|
exclude: [
|
|
'src/**/*.{test,spec}.ts',
|
|
'src/**/__tests__/**',
|
|
'web/**/*.{test,spec}.{ts,tsx}',
|
|
'web/**/__tests__/**',
|
|
],
|
|
},
|
|
},
|
|
});
|