Agent skill
reviewing-test-quality
Review React 19 test quality including coverage, patterns, and React 19 API testing. Use when reviewing tests or test coverage.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/testing/reviewing-test-quality
SKILL.md
Review: Test Quality
For Vitest configuration validation (pool options, coverage setup, deprecated patterns), see vitest-4/skills/reviewing-vitest-config/SKILL.md.
Checklist
Test Coverage
- Components have tests for user interactions
- Forms test both success and error paths
- Server Actions tested in isolation
- Custom hooks tested with
renderHook - Edge cases covered (empty states, errors, loading)
React 19 APIs
- Forms using
useActionStatehave tests -
useOptimisticupdates tested for immediate feedback -
useFormStatustested within form component context - Server Actions tested with mocked auth/database
-
use()hook tested with Promises and Context
Testing Patterns
- Using
@testing-library/reactand@testing-library/user-event - Queries prefer accessibility (
getByRole,getByLabelText) -
waitForused for async assertions - Mocking external dependencies (API, database)
- Tests are isolated and don't depend on each other
Anti-Patterns
- ❌ Testing implementation details (internal state, methods)
- ❌ Querying by class names or data-testid when role available
- ❌ Not waiting for async updates (
waitFor) - ❌ Testing components without user interactions
- ❌ Missing error case tests
Server Action Testing
- Server Actions tested as functions (not through UI)
- Input validation tested
- Authentication/authorization tested
- Database operations mocked
- Error handling tested
For typed test fixtures and mocks, use the TYPES-generics skill from the typescript plugin.
For comprehensive testing patterns, see: research/react-19-comprehensive.md.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?