Commit Graph

2 Commits

Author SHA1 Message Date
iven
6997bb1d90 test: Phase 0 测试基础设施 — TestApp + MSW + 覆盖率工具 + CI
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 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)
2026-04-27 21:12:08 +08:00
iven
55a3fd32d0 test(web): 添加 vitest 单元测试基础设施和初始测试用例
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 安装 vitest + @testing-library/react + @testing-library/jest-dom + jsdom
- 创建 vitest.config.ts (jsdom 环境, 全局 API, e2e 目录排除)
- 创建 test/setup.ts (@testing-library/jest-dom 匹配器)
- 添加 29 个测试用例: health 常量 (14), useThemeMode hook (2), StatusTag 组件 (13)
2026-04-25 10:11:30 +08:00