mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-13 05:03:28 +08:00
docs: Add Chinese (zh-CN) translations for all documentation
* docs: add Chinese versions docs * update --------- Co-authored-by: neo <neo.dowithless@gmail.com>
This commit is contained in:
32
docs/zh-CN/rules/testing.md
Normal file
32
docs/zh-CN/rules/testing.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# 测试要求
|
||||
|
||||
## 最低测试覆盖率:80%
|
||||
|
||||
测试类型(全部需要):
|
||||
|
||||
1. **单元测试** - 单个函数、工具、组件
|
||||
2. **集成测试** - API 端点、数据库操作
|
||||
3. **端到端测试** - 关键用户流程 (Playwright)
|
||||
|
||||
## 测试驱动开发
|
||||
|
||||
强制工作流程:
|
||||
|
||||
1. 先写测试 (失败)
|
||||
2. 运行测试 - 它应该失败
|
||||
3. 编写最小实现 (成功)
|
||||
4. 运行测试 - 它应该通过
|
||||
5. 重构 (改进)
|
||||
6. 验证覆盖率 (80%+)
|
||||
|
||||
## 测试失败排查
|
||||
|
||||
1. 使用 **tdd-guide** 代理
|
||||
2. 检查测试隔离性
|
||||
3. 验证模拟是否正确
|
||||
4. 修复实现,而不是测试(除非测试有误)
|
||||
|
||||
## 代理支持
|
||||
|
||||
* **tdd-guide** - 主动用于新功能,强制执行先写测试
|
||||
* **e2e-runner** - Playwright 端到端测试专家
|
||||
Reference in New Issue
Block a user