← 教程列表
news

Quick Reference

📅 2026/6/12 16:30:02⏱ 约 5 分钟阅读👁 9 阅读

| Anti-Pattern | Fix | |--------------|-----| | Assert on mock elements | Test real component or unmock it | | Test-only methods in production | Move to test utilities | | Mock without understanding | Understand dependencies first, mock minimally | | Incomplete mocks | Mirror real API completely | | Tests as afterthought | TDD - tests first | | Over-complex mocks | Consider integration tests |

← 返回教程列表 AI8899 · 内容仅供学习参考