callstackincubator avatar

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

Installs 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:

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

More from callstackincubator/agent-skills

All 10
1callstackincubator avatarvercel-react-native-skillscallstackincubator/agent-skillsA collection of agent-optimized React Native skills for AI coding assistants.0skills.sh installs
2CongDon1207 avatarangular-api-serviceCongDon1207/AGENTS.mdAngular devs know that HTTP services can quickly become a mess of repeated code and inconsistent error handling.0skills.sh installs
3davila7 avatarHTML Injection Testingdavila7/claude-code-templatesThis skill should be used when the user asks to "test for HTML injection", "inject HTML into web pages", "perform HTML injection attacks", "deface web applicati0skills.sh installs
4kubesphere avatarfrontend-forge-fe-operationskubesphere/kubesphereOperate FrontendExtension (FE) resources in frontend-forge: create, update, rebuild, inspect package artifacts, download packages, publish, unpublish, delete, a0skills.sh installs
5kubesphere avatarfrontend-forge-fi-operationskubesphere/kubesphereOperate FrontendIntegration resources and the frontend-forge extension. Use when Codex needs to create a FrontendIntegration from FrontendIntegration YAML, upda0skills.sh installs
6kubesphere avatarfrontend-integration-yamlkubesphere/kubesphereGenerate canonical FrontendIntegration YAML from a simplified single-menu authoring model for frontend-forge.0skills.sh installs