
React native testing
Guides writing React Native component tests with React Native Testing Library v13 and v14
React native testing is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 1.7K
- Last commit
- License
- MIT
- Listing updated
Similar skills
About React native testing
This skill gives the agent a working guide for writing and fixing React Native component tests with @testing-library/react-native. It starts by checking the installed RNTL version in package.json, then loads the matching reference: v14 uses async render and test-renderer, while v13 uses sync render and react-test-renderer. The guide sets a query priority that favors accessible roles and labels over test IDs, explains the getBy, queryBy, findBy and getAllBy variants, and lists the Jest matchers available from RNTL.
The skill also covers interaction patterns. It recommends userEvent for presses, typing, clearing, pasting and scrolling, with fireEvent kept for events userEvent does not support. It sets rules such as preferring findBy over waitFor, keeping side effects out of waitFor, avoiding manual act and cleanup calls, and using fake timers with userEvent. A custom render example shows how to wrap tests in providers. Separate reference files and an anti-patterns list hold the full API details.
Users should have a React Native project using Jest with either RNTL v13 or v14 installed. The skill includes no scripts; it provides guidance that the agent applies to the project's own test files.
When your agent uses it
Write tests using React Native Testing Library (RNTL) v13 and v14 (`@testing-library/react-native`). Use when writing, reviewing, or fixing React Native component tests. Covers: render, screen, queries (getBy/getAllBy/queryBy/findBy), Jest matchers, userEvent, fireEvent, waitFor, and async patterns. Supports v13 (React 18, sync render) and v14 (React 19+, async render). Triggers on: test files for React Native components, RNTL imports, mentions of "testing library", "write tests", "component tests", or "RNTL".
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 4 files (52 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
Copy the skill folder to ~/.claude/skills/react-native-testing to use it in all your projects:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/callstackincubator/agent-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/react-native-testing &&
cp -R "$tmp/plugins/vendored/.agents/skills/react-native-testing" ~/.claude/skills/react-native-testing &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/react-native-testing inside it instead.
Copy the skill folder to ~/.agents/skills/react-native-testing to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/callstackincubator/agent-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/react-native-testing &&
cp -R "$tmp/plugins/vendored/.agents/skills/react-native-testing" ~/.agents/skills/react-native-testing &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/react-native-testing inside it instead.
Copy the skill folder to ~/.cursor/skills/react-native-testing to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/callstackincubator/agent-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/react-native-testing &&
cp -R "$tmp/plugins/vendored/.agents/skills/react-native-testing" ~/.cursor/skills/react-native-testing &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/react-native-testing inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/callstackincubator/agent-skills.git --path plugins/vendored/.agents/skills/react-native-testingOr copy the folder to ~/.gemini/skills/react-native-testing yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/react-native-testing:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/callstackincubator/agent-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/react-native-testing &&
cp -R "$tmp/plugins/vendored/.agents/skills/react-native-testing" ~/.copilot/skills/react-native-testing &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/react-native-testing inside it instead.
Get the folder:
git clone --depth 1 https://github.com/callstackincubator/agent-skills.gitThen copy agent-skills/plugins/vendored/.agents/skills/react-native-testing into your agent's skills folder as react-native-testing. Agents that support SKILL.md read one folder per skill.
What it does
- Version-aware render guidance
- Chooses between the v13 sync and v14 async APIs based on the installed RNTL version.
- Query priority rules
- Orders queries from accessible roles and labels down to test IDs as a last resort.
- User interaction patterns
- Shows userEvent usage for press, long press, typing, clearing, pasting and scrolling.
- Async assertion practices
- Recommends findBy queries over waitFor with getBy and explains waitFor limits.
- Jest matcher reference
- Lists RNTL matchers for visibility, enabled state, text, style and accessibility checks.
- Custom provider wrapper
- Demonstrates a render helper that wraps components in providers via the wrapper option.
Good for
- Write component tests for a React Native screen
- Fix a failing test that uses waitFor incorrectly
- Migrate tests from fireEvent to userEvent
- Test a form with text input and a submit button
- Add provider wrapping to a custom render helper
- Review existing RNTL tests for anti-patterns
React native testing FAQ
How does the skill decide which RNTL API to use?
It checks the version of @testing-library/react-native in the project's package.json. v14 uses async APIs with test-renderer, and v13 uses sync APIs with react-test-renderer.
Does React native testing run any scripts or change files?
No scripts are included. It is a set of written guidance and reference files that the agent follows when writing or reviewing tests.
Which query should I use first?
The guide recommends getByRole with a name option first, then getByLabelText, getByPlaceholderText, getByText, getByDisplayValue, and getByTestId as a last resort.
Is the skill open source?
The repository is listed under the MIT license.
How do I install React native testing in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/react-native-testing to use it in all your projects, or to .claude/skills/react-native-testing in one project.
Does React native testing run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use React native testing?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to React native testing?
The closest alternatives to React native testing are JavaScript TypeScript jest, Jest skill, React19 test patterns, React18 enzyme to rtl and Test authoring edho ferdian.
Where this comes from
- Description: from the skill's own SKILL.md.
More from callstackincubator/agent-skills

Checks the repo's skills against the agentskills.io spec and Claude Code guidelines
- Open source
- 1.7K GitHub stars
- Developer tools

Lets an agent drive iOS, tvOS, macOS and Android apps via snapshots and taps
- Open source
- 1.7K GitHub stars
- Browser automation

Guides an agent through exploratory QA of a mobile app with evidence-backed bug reports
- Open source
- 1.7K GitHub stars
- Developer tools

Guides a go/no-go decision on moving a mobile product to React Native
- Open source
- 1.7K GitHub stars
- Developer tools

Scaffolds React Native libraries and local native modules with create-react-native-library
- Open source
- 1.7K GitHub stars
- Developer tools

Sets up CI workflows that build React Native simulator and emulator apps and publish
- Open source
- 1.7K GitHub stars
- Developer tools



