react-testing

Installation
SKILL.md

React Testing Library

This skill focuses on React-specific testing patterns. For general DOM testing patterns (queries, userEvent, async, accessibility), load the frontend-testing skill. For TDD workflow, load the tdd skill.

Core Principles

React components are functions - Test them like functions: inputs (props) → output (rendered DOM).

Test behavior, not implementation:

  • ✅ Test what users see and do
  • ✅ Test through public APIs (props, rendered output)
  • ❌ Don't test component state
  • ❌ Don't test component methods
  • ❌ Don't use shallow rendering

Modern RTL handles cleanup automatically:

Installs
19
Repository
mintuz/skills
GitHub Stars
22
First Seen
Jan 24, 2026
react-testing — mintuz/skills