reviewing-test-quality
1
总安装量
1
周安装量
#48628
全站排名
安装命令
npx skills add https://github.com/djankies/claude-configs --skill reviewing-test-quality
Agent 安装分布
replit
1
junie
1
windsurf
1
trae
1
qoder
1
opencode
1
Skill 文档
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.