ワンクリックで
testing-workflow
Write, run, and maintain tests using Vitest with proper isolation patterns and coverage targets.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Write, run, and maintain tests using Vitest with proper isolation patterns and coverage targets.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
Migrate from Next.js 15 to Next.js 16 and handle breaking changes
Configure Content Security Policy and security headers for the portfolio
Deploy Next.js to Cloudflare Workers using OpenNext adapter
Manage the canary token honeypot system for detecting security scanning
Write, debug, and optimize GROQ queries for Sanity CMS in this portfolio
Advanced TypeScript patterns and type safety as used in this portfolio
SOC 職業分類に基づく
| name | testing-workflow |
| description | Write, run, and maintain tests using Vitest with proper isolation patterns and coverage targets. |
Guides the process of writing and maintaining tests for the portfolio using Vitest, React Testing Library, and the established testing patterns in the codebase.
Understand the test target — Check if it's a component, utility function, hook, or API route. Each has different testing patterns.
Find existing test patterns — Look at neighboring test files (*.test.ts, *.test.tsx, __tests__/ directories) to understand naming conventions and setup patterns.
Test structure — Follow AAA pattern (Arrange, Act, Assert). Group related tests with describe. Use clear, descriptive test names.
SWR isolation — Any test exercising a SWR consumer must wrap it in SWRConfig with provider: () => new Map() to prevent cache leaks between tests.
Component testing — Use @testing-library/react with render, screen queries. Prefer getByRole, getByText, getByLabelText over test IDs. Test behavior, not implementation.
Run the test suite — npm run test -- --run. Ensure all 266 tests pass (29 test files). No .only or .skip left in committed code.
Coverage — Aim for meaningful coverage, not 100% for its own sake. Studio, scripts, and generated code are excluded.
tests/ directory at the root@testing-library/reactSWRConfig provider isolation.only or .skip in committed tests