react-native-testing-patterns

Standardize React Native testing patterns for MST, RTL, and Maestro workflows.

Updated Dec 28, 2025
One-click install
npx skills add https://github.com/PlaneInABottle/fitnessMobileApp --skill react-native-testing-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-native-testing-patterns
Source: https://github.com/PlaneInABottle/fitnessMobileApp/tree/main/.claude/skills/react-native-testing-patterns
Command: npx skills add https://github.com/PlaneInABottle/fitnessMobileApp --skill react-native-testing-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Streamlines and standardizes testing practices across the Fitness Tracker app, covering unit tests for MST models and stores, component tests with RTL, and Maestro-based E2E flows.

Core Features & Use Cases

  • Unit Testing (MST): Model testing and store validation patterns for MST models and environments.
  • Component Testing (RTL): Patterns for rendering components with providers, interaction testing, and asynchronous testing.
  • Mocking Patterns: Centralized mocks for Expo modules and native dependencies.
  • E2E Testing (Maestro): End-to-end flow patterns for Maestro-driven tests.
  • References: See additional documentation in the references folder for MST_TESTING, COMPONENT_TESTING, and MAESTRO_FLOWS.

Quick Start

Install dependencies and run the test suite to validate unit, component, and Maestro flow tests.

Frequently Asked Questions about react-native-testing-patterns

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

FAQPage Schema
How do I write unit tests for MST stores and models in a React Native app?

Unit testing MST stores requires validating state mutations and environment interactions. This Skill provides standardized patterns for Jest-driven model testing, ensuring consistent store validation and predictable behavior across your React Native application.

What is the best way to mock Expo modules and native dependencies for React Native component tests?

Mocking Expo modules uses centralized mock patterns to isolate components during testing. This Skill establishes a unified mocking structure to prevent native module errors from breaking your React Native component test suite.

Can I use React Testing Library with Maestro for end-to-end testing in React Native?

React Testing Library handles component rendering while Maestro drives end-to-end flows. This Skill separates these concerns by providing distinct patterns for RTL component tests and Maestro E2E testing within the same React Native workflow.

Does this testing pattern support asynchronous component testing with React Testing Library?

Asynchronous component testing is fully supported. The Skill defines specific RTL patterns for handling async operations, allowing you to reliably test React Native components that fetch data or update state after user interactions.

How do I standardize testing practices across different levels of a React Native application?

Standardizing testing involves creating unified patterns for unit, integration, and E2E tests. This Skill applies consistent testing workflows across MST models, RTL components, and Maestro E2E flows to streamline your React Native test suite.