react-testing-library
Installation
SKILL.md
React Testing Library Best Practices
43 rules across 9 categories for testing React components with Testing Library, prioritized by impact to guide test writing and code review.
Scope
This skill owns React component and hook testing mechanics. For
framework-agnostic questions — which level a behavior belongs at, what a coverage
number means, how to choose test data, how to kill a flake — use
testing-expert.
When to Apply
- Writing new component tests with React Testing Library
- Selecting queries (getByRole, getByLabelText, etc.)
- Handling async operations in tests (findBy, waitFor)
- Simulating user interactions (userEvent)
- Reviewing tests for anti-patterns and implementation detail testing