react-native-testing

react-native-testing is a skill for Claude Code, Codex from callstackincubator/agent-skills. It costs 134 tokens per session (1,740 once invoked), scanned A, a copy of react-native-testing, MIT.

A guide for writing tests for React Native components with React Native Testing Library, a tool for checking mobile interface behavior.

In plain words
What is it for?
Use it when writing, reviewing, or fixing component tests involving rendering, element queries, user actions, matchers, and asynchronous behavior.
Why use it?
It helps avoid incorrect test code by accounting for differences between library versions 13 and 14 and by choosing suitable ways to find interface elements.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when writing, reviewing, or fixing component tests involving rendering, element queries, user actions, matchers, and asynchronous behavior.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/callstackincubator/agent-skills/react-native-testing
About the project

Callstack Agent Skills is a collection of instructions that gives AI coding assistants practical knowledge for building React Native applications. Developers use it for app development, performance, navigation, testing, CI, device automation, and migrations to React Native. The catalogue entries are the project's skills, rules, and instructions for compatible coding assistants.

callstackincubator/agent-skills · 1,673 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add callstackincubator/agent-skills --skill react-native-testing
Clone the repo
git clone --depth 1 https://github.com/callstackincubator/agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for react-native-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/callstackincubator/agent-skills/react-native-testing/github.svg)](https://agentmods.dev/skills/callstackincubator/agent-skills/react-native-testing)
Your own site
<a href="https://agentmods.dev/skills/callstackincubator/agent-skills/react-native-testing"><img src="https://agentmods.dev/badge/skills/callstackincubator/agent-skills/react-native-testing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for react-native-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/callstackincubator/agent-skills/react-native-testing"><img src="https://agentmods.dev/badge/skills/callstackincubator/agent-skills/react-native-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 134 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,740 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00134 $0.01740
Opus 5.5 $0.00054 $0.00696
Sonnet 5.5 $0.00027 $0.00348
Haiku 4.5 $0.00013 $0.00174

Measured 1mo ago against content hash dea54d1d397c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

react-native-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to react-native-testing — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/vendored/.agents/skills/react-native-testing/SKILL.md · 162 lines

How it starts

The opening of the file, as written. The whole thing — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

Variant Use case Returns Async
getBy* Element must exist element instance (throws) No
getAllBy* Multiple must exist element instance[] (throws) No
queryBy* Check non-existence ONLY element instance | null No
queryAllBy* Count elements element instance[] No
findBy* Wait for element Promise<element instance> Yes
findAllBy* Wait for multiple Promise<element instance[]> Yes

Interactions

Prefer userEvent over fireEvent. userEvent is always async.

const user = userEvent.setup();
await user.press(element); // full press sequence
await user.longPress(element, { duration: 800 }); // long press
await user.type(textInput, 'Hello'); // char-by-char typing
await user.clear(textInput); // clear TextInput
await user.paste(textInput, 'pasted text'); // paste into TextInput
await user.scrollTo(scrollView, { y: 100 }); // scroll

Read the full file on GitHub · 162 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 162 lines · 134 tokens per session scan A dea54d1d397c

Subscribe to this mod's changes

react-native-testing is a skill published in the GitHub repository callstackincubator/agent-skills (1,673 stars, last pushed 9d ago), licensed MIT. It adds 134 tokens to every session and 1,740 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to react-native-testing, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

swift-protocol-di-testing

Protocol-based dependency injection for testable Swift code — mock file system, network, and external APIs using focused protocols and Swift Testing.

affaan-m/ECC · 32 tokens

android-do-not-mock

How to write (or fix) Chromium Java unit tests (Robolectric / JUnit) without mocking or spying android.view.View, android.app.Activity, or their subclasses. Use when removing @SuppressWarnings("DoNotMock"), fixing a "DoNotMock" Error Prone error, replacing Mockito.mock(View.class) / @Mock Activity / spy(view), or when…

chromium/chromium · 96 tokens

android-unit-test

Guide for writing and converting Chromium Android unit tests across host Robolectric (chromejunittests) and on-device (chromepublicunittestapk) suites.

chromium/chromium · 36 tokens

react-native-testing

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…

callstack/react-native-testing-library · 134 tokens

flutter-add-widget-test

Implement a component-level test using WidgetTester to verify UI rendering and user interactions (tapping, scrolling, entering text). Use when validating that a specific widget displays correct data and responds to events as expected.

flutter/agent-plugins · 48 tokens

flutter-testing-skill

Generates Flutter widget tests, integration tests, and golden tests in Dart. Supports local execution and TestMu AI cloud for real device testing. Use when user mentions "Flutter", "widget test", "WidgetTester", "testWidgets", "fluttertest", "integrationtest". Triggers on: "Flutter", "widget test", "Dart test"…

LambdaTest/agent-skills · 89 tokens