mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-31 06:03:29 +08:00
- Add missing code-review.md and development-workflow.md to zh/README.md directory listing - Add mkdir -p command before copy in manual install instructions - Fix TypeScript test command path in SKILL-DEVELOPMENT-GUIDE.md - Add Anti-Patterns section to SKILL.md template - Add Template category to Skill Categories table in CONTRIBUTING.md - Add Pre-Review Requirements section to code-review.md (both en and zh) - Add Pre-Review Checks step to development-workflow.md (both en and zh) - Add trailing newlines to all files that were missing them
30 lines
709 B
Markdown
30 lines
709 B
Markdown
# 测试要求
|
||
|
||
## 最低测试覆盖率:80%
|
||
|
||
测试类型(全部必需):
|
||
1. **单元测试** - 单个函数、工具、组件
|
||
2. **集成测试** - API 端点、数据库操作
|
||
3. **E2E 测试** - 关键用户流程(框架根据语言选择)
|
||
|
||
## 测试驱动开发
|
||
|
||
强制工作流:
|
||
1. 先写测试(RED)
|
||
2. 运行测试 - 应该失败
|
||
3. 编写最小实现(GREEN)
|
||
4. 运行测试 - 应该通过
|
||
5. 重构(IMPROVE)
|
||
6. 验证覆盖率(80%+)
|
||
|
||
## 测试失败排查
|
||
|
||
1. 使用 **tdd-guide** 代理
|
||
2. 检查测试隔离
|
||
3. 验证模拟是否正确
|
||
4. 修复实现,而非测试(除非测试有误)
|
||
|
||
## 代理支持
|
||
|
||
- **tdd-guide** - 主动用于新功能,强制先写测试
|