
React Native Testing
If you're writing React Native tests and haven't touched RNTL in a while, your mental model is probably wrong. This skill covers both v13 and v14 APIs, which differ significantly in sync versus async behavior, especially around render and fireEvent. It auto-detects your project version from package.json and loads the right reference. The guide is opinionated in a good way: it pushes you toward userEvent over fireEvent, getByRole over getByTestId, and findBy over waitFor plus getBy. It also calls out the anti-patterns that trip people up, like putting side effects inside waitFor or manually calling act. Treat this as your source of truth when Claude's training data conflicts with current RNTL conventions.
- GitHub stars
- 1.4K
- last updated
- Jun 2, 2026
Install
$ npx -y skills add callstackincubator/agent-skills --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/callstackincubator/agent-skills
- Categories
- Frontend Development, Testing & QA, AI & Agent Building, Mobile Development
- License
- MIT
- First seen
- Jun 11, 2026