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.
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