rn-testing

Test React Native apps using Jest and React Native Testing Library patterns.

Updated Dec 22, 2025
One-click install
npx skills add https://github.com/CJHarmath/claude-agents-skills --skill rn-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rn-testing
Source: https://github.com/CJHarmath/claude-agents-skills/tree/main/skills/rn-testing
Command: npx skills add https://github.com/CJHarmath/claude-agents-skills --skill rn-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

React Native testing requires extensive mocking of native modules, careful handling of async operations, and understanding of Zustand store testing patterns. This codebase has 30+ test files with established patterns.

Core Features & Use Cases

  • Pattern: Zustand Store Testing
  • Pattern: Async Store Operations
  • Pattern: Expo Module Mocking
  • Pattern: React Query Testing
  • Pattern: Custom Hook Testing
  • Pattern: Component Testing
  • Pattern: Navigation Testing
  • Pattern: Avoiding act() Warnings
  • Pattern: Snapshot Testing
  • Pattern: Mocking API Calls

Quick Start

Install project testing dependencies, configure mock modules for Expo as shown in SKILL.md, and begin writing tests using the patterns covered in this unit.

Frequently Asked Questions about rn-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I mock Expo modules in React Native Jest tests?

Mock Expo modules in React Native testing by configuring mock modules as shown in the SKILL.md setup, providing proven patterns to isolate native dependencies and ensure reliable component testing.

What is the best way to test a Zustand store with React Native Testing Library?

Testing a Zustand store with React Native Testing Library involves using established patterns for async store operations and state assertions. This skill provides specific patterns to test Zustand stores reliably alongside your component tests.

Why do I get act() warnings when testing React Native components?

Act() warnings occur when asynchronous state updates happen outside the test's act() block. Avoiding act() warnings requires careful act-wrapping patterns during component testing, specifically addressing async operations and state updates in React Native.

Can I use Jest and React Native Testing Library to test async navigation flows?

Yes, you can test async navigation flows using Jest and React Native Testing Library. The skill covers navigation testing patterns and async store operations, ensuring your React Native navigation logic is validated reliably.

Does this React Native testing approach work with React Query and custom hooks?

Yes, this React Native testing approach works with React Query and custom hooks. It provides dedicated patterns for React Query testing and custom hook testing, allowing you to mock API calls and validate hook logic effectively.