- Translate all 101 markdown files: P1 core, all 10 modules, examples, auxiliary docs (CONTRIBUTING, CODE_OF_CONDUCT, SECURITY, CLAUDE.md, etc.), peripheral docs (.github/, docs/, resources/, scripts/) - Translate comments and user-facing messages in 06-hooks/*.sh examples - Copy 05-mcp/*.json examples (standard JSON, no comments) - Update root README.md language switcher to include 日本語 - Add ja/TRANSLATION_NOTES.md (glossary + style guide) All translations pass pre-commit quality gates (markdown-lint, cross-references, mermaid-syntax, link-check, build-epub).
1.4 KiB
1.4 KiB
name: Expand Unit Tests description: 未テストの分岐やエッジケースを狙ってテストカバレッジを高める tags: testing, coverage, unit-tests
ユニットテストの拡充
プロジェクトのテストフレームワークに合わせて、既存のユニットテストを拡充する:
- カバレッジを分析: カバレッジレポートを実行し、未テストの分岐、エッジケース、低カバレッジ領域を特定する
- ギャップを特定: コードを見直し、論理分岐、エラー経路、境界条件、null/空入力を確認する
- プロジェクトのフレームワークでテストを書く:
- Jest/Vitest/Mocha(JavaScript/TypeScript)
- pytest/unittest(Python)
- Go testing/testify(Go)
- Rust のテストフレームワーク(Rust)
- 特定のシナリオを狙う:
- エラーハンドリングと例外
- 境界値(最小/最大、空、null)
- エッジケース・コーナーケース
- 状態遷移と副作用
- 改善を確認: 再度カバレッジを計測し、計測可能な向上を確認する
新しく追加したテストコードのみを提示する。既存のテストパターンと命名規則に従う。
Last Updated: April 9, 2026