test-driven-development

Enforce failing tests before production code in React Native features.

28|1|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/bidah/react-native-hifi --skill test-driven-development-bidah
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/bidah/react-native-hifi/tree/main/skills/test-driven-development
Command: npx skills add https://github.com/bidah/react-native-hifi --skill test-driven-development-bidah

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It keeps React Native engineers from shipping unverified production code by forcing every feature, bug fix, or refactor through a failing test before implementation.

Core Features & Use Cases

  • TDD discipline: Follow the Red-Green-Refactor loop, watch each test fail for the intended reason, and keep the code minimal until it passes.
  • Testing toolbox: Run npx jest with the jest-expo preset, lean on React Native Testing Library queries, and consult the bundled testing-anti-patterns reference plus the react-native-testing skill for up-to-date query guidance.
  • Real scenarios: Apply this whenever your agent is adding UI, refactoring shared state, fixing regressions, or validating async flows so that every behavior change has a regression-proof test.

Quick Start

Ask the agent to plan your next React Native change by writing a failing test before implementation, then proceed through the Red-Green-Refactor loop.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I enforce test-driven development when building React Native features?▼

Test-driven development for React Native is enforced by requiring a failing test before any production code is written, then following the Red-Green-Refactor loop to keep behavior verified and regressions prevented.

What is the Red-Green-Refactor loop in React Native testing?▼

The Red-Green-Refactor loop is a test-driven development cycle where you write a failing test for the intended reason, implement minimal code to pass it, and then refactor while keeping tests green to verify React Native behavior.

How do I run Jest tests with the Expo preset for React Native?▼

You run Jest tests for React Native using the npx jest command with the jest-expo preset, leveraging React Native Testing Library queries to validate UI components and async flows.

Can I use semantic testing queries for React Native component validations?▼

Yes, semantic testing queries from React Native Testing Library are used to validate component behavior, ensuring tests interact with elements as users would rather than relying on implementation details.

Does test-driven development work for React Native refactoring and bug fixes?▼

Yes, test-driven development applies to React Native refactoring and bug fixes by requiring a failing test that reproduces the regression before applying the minimal code change needed to pass it.

What are common testing anti-patterns when using Jest with React Native?▼

Common testing anti-patterns are addressed by consulting a bundled testing-anti-patterns reference and the react-native-testing skill for up-to-date semantic query guidance to avoid testing implementation details.