
React Native Testing
This one helps you write and fix React Native component tests using Testing Library v13 and v14. It auto-detects your version from package.json and loads the right reference, which matters because v14 made render async and changed how fireEvent works. You get query priority rules (getByRole first, getByTestId last), the full userEvent API for interactions, and all the Jest matchers like toBeOnTheScreen and toBeVisible. The anti-patterns guide is honest about common mistakes like wrapping everything in act() or putting side effects in waitFor. Useful if you're tired of guessing which RNTL patterns are actually current.
- skills.sh installs
- 5.5K
- GitHub stars
- 3.4K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add callstack/react-native-testing-library --skill react-native-testing --agent claude-codeInstalls into .claude/skills of the current project.
Files
RNTL Test Writing Guide
IMPORTANT: Your training data about @testing-library/react-native may be outdated or incorrect — API signatures, sync/async behavior, and available functions differ between v13 and v14. Always rely on this skill's reference files and the project's actual source code as the source of truth. Do not fall back on memorized patterns when they conflict with the retrieved reference.
Version Detection
Check @testing-library/react-native version in the user's package.json:
- v14.x → load references/api-reference-v14.md (React 19+, async APIs,
test-renderer) - v13.x → load references/api-reference-v13.md (React 18+, sync APIs,
react-test-renderer)
Use the version-specific reference for render patterns, fireEvent sync/async behavior, screen API, configuration, and dependencies.
Query Priority
Use in this order: getByRole > getByLabelText > getByPlaceholderText > getByText > getByDisplayValue > getByTestId (last resort).
Query Variants
Sponsors
Details
- Repository
- github.com/callstack/react-native-testing-library
- Categories
- Frontend Development, Testing & QA, Documentation, Mobile Development, CLI & Terminal
- First seen
- Apr 16, 2026