mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-30 21:53:28 +08:00
- Add rules/zh/ directory with complete Chinese translations - Translate all 10 common rule files: - coding-style.md - security.md - testing.md - git-workflow.md - performance.md - patterns.md - hooks.md - agents.md - development-workflow.md - code-review.md - Add README.md for the zh directory explaining structure and installation - Maintain consistent formatting with original English versions - Keep technical terms and code examples in English where appropriate
708 B
708 B
测试要求
最低测试覆盖率:80%
测试类型(全部必需):
- 单元测试 - 单个函数、工具、组件
- 集成测试 - API 端点、数据库操作
- E2E 测试 - 关键用户流程(框架根据语言选择)
测试驱动开发
强制工作流:
- 先写测试(RED)
- 运行测试 - 应该失败
- 编写最小实现(GREEN)
- 运行测试 - 应该通过
- 重构(IMPROVE)
- 验证覆盖率(80%+)
测试失败排查
- 使用 tdd-guide 代理
- 检查测试隔离
- 验证模拟是否正确
- 修复实现,而非测试(除非测试有误)
代理支持
- tdd-guide - 主动用于新功能,强制先写测试