mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-30 13:43:26 +08:00
feat: add Chinese (zh-CN) translation for rules/common
- 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
This commit is contained in:
29
rules/zh/testing.md
Normal file
29
rules/zh/testing.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# 测试要求
|
||||
|
||||
## 最低测试覆盖率:80%
|
||||
|
||||
测试类型(全部必需):
|
||||
1. **单元测试** - 单个函数、工具、组件
|
||||
2. **集成测试** - API 端点、数据库操作
|
||||
3. **E2E 测试** - 关键用户流程(框架根据语言选择)
|
||||
|
||||
## 测试驱动开发
|
||||
|
||||
强制工作流:
|
||||
1. 先写测试(RED)
|
||||
2. 运行测试 - 应该失败
|
||||
3. 编写最小实现(GREEN)
|
||||
4. 运行测试 - 应该通过
|
||||
5. 重构(IMPROVE)
|
||||
6. 验证覆盖率(80%+)
|
||||
|
||||
## 测试失败排查
|
||||
|
||||
1. 使用 **tdd-guide** 代理
|
||||
2. 检查测试隔离
|
||||
3. 验证模拟是否正确
|
||||
4. 修复实现,而非测试(除非测试有误)
|
||||
|
||||
## 代理支持
|
||||
|
||||
- **tdd-guide** - 主动用于新功能,强制先写测试
|
||||
Reference in New Issue
Block a user