- TestApp struct 封装 TestDb + HealthState + tenant_id/operator_id - TestFixture 工厂方法: create_patient/create_doctor/create_schedule/create_appointment - 前端 MSW v2 handlers (auth) + server setup + vitest 集成 - vitest coverage v8 配置 + test:coverage script - GitHub Actions CI: backend (check + test + clippy) + frontend (tsc + test + build)
25 lines
579 B
TypeScript
25 lines
579 B
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: ['./src/test/setup.ts'],
|
|
exclude: ['e2e/**', 'node_modules/**'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'lcov'],
|
|
include: ['src/**/*.{ts,tsx}'],
|
|
exclude: ['src/test/**', 'src/**/*.test.*', 'src/**/*.d.ts'],
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
})
|