unit-test-mocking
Mocking patterns for Vitest unit tests. Read this only when mocking is required.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Mocking patterns for Vitest unit tests. Read this only when mocking is required.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
Create or update custom React hooks with clear API design, TypeScript-friendly patterns, and test-first workflow. Use when the user asks to make/build/create/modify a custom hook, refactor hook logic, or add/update hook tests.
Write and maintain unit tests with Vitest. Test titles MUST be English `it('should ...')` strings. Use when adding or updating unit tests, improving test coverage, or handling unavoidable coverage gaps with documented ignore comments.
Basic Vitest module mocking pattern with vi.mock.
Keep real exports and override only selected functions in Vitest.
SOC 職業分類に基づく
| name | unit-test-mocking |
| description | Mocking patterns for Vitest unit tests. Read this only when mocking is required. |
vi.clearAllMocks(), vi.restoreAllMocks(), or reset modules as needed for dynamic import patterns../module-mocking/SKILL.md./module-mocking-with-actual-exports/SKILL.md