| name | testing-conventions |
| description | Testing conventions covering unit tests, component tests, and E2E tests. Auto-triggers when writing or modifying test files matching `*.test.ts`, `*.test.tsx`, `*.spec.ts`, `*.spec.tsx`, or files under `e2e/**/*`. Uses Vitest for unit/component tests and Playwright for E2E tests. |
Testing Conventions
テスト方針の規約集。何をどうテストし、何をスキップするかの判断基準を定義する。
- 単体テスト / コンポーネントテスト: Vitest + Testing Library
- E2E テスト: Playwright
When to Apply
以下のいずれかに該当する作業時に自動で参照する:
- 次のパターンに一致するファイルの作成・修正
*.test.ts
*.test.tsx
*.spec.ts
*.spec.tsx
e2e/**/*
- テスト対象のロジックやコンポーネントの実装時
- テスト戦略の設計・レビュー
Compatibility
Vitest 3+ / Playwright 1.40+ / @testing-library/react 16+
Rule Categories
| Category | Prefix |
|---|
| テスト配置 | structure- |
| テスト方針 | strategy- |
| 単体テスト | unit- |
| コンポーネントテスト | component- |
| E2E テスト | e2e- |
Quick Reference
テスト配置
テスト方針
単体テスト
コンポーネントテスト
E2E テスト
How to Use
個別ルールの詳細は rules/ ディレクトリ内のファイルを参照。上記 Quick Reference のリンクから各ルールにアクセスできる。