What problem does it solve?
This Skill reduces flaky, slow, and hard-to-debug React Native component tests by standardizing how you query the UI, trigger interactions, and wait for async updates across RNTL versions.
Core Features & Use Cases
- Version-aware RNTL guidance (v13 vs v14): Choose the correct render and event semantics depending on your installed
@testing-library/react-native version.
- Query strategy that matches accessibility: Use
getByRole (and related queries) with clear priority rules to target the right UI element.
- Interaction and async patterns: Prefer
userEvent (async) over fireEvent, and use findBy* / correct waitFor rules to avoid race conditions.
- Assertion best practices with RNTL matchers: Use recommended Jest matchers like visibility, enabled/disabled, text content, and accessibility name instead of brittle prop checks.
- Anti-pattern guardrails: Avoid side effects in
waitFor, unnecessary act(), destructuring render queries, manual cleanup, legacy accessibility props, and removed APIs in v14.
Quick Start
Use the react-native-testing skill to write tests for a React Native component by ensuring your queries use screen with getByRole and your assertions use RNTL matchers while awaiting async interactions appropriately.