New advertisers: 50% off your first month with code FIRSTMONTHSee slots
itechmeat avatar

React Testing Library

Accessibility-first component tests for React using role, label, and text queries plus user-event simulation.

skills.sh installs
1.4K
GitHub stars
23
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers query selection by role, label, and text, with a priority order that prefers accessible queries over test IDs
  • Includes reference guides for queries, user events, async utilities, the core API, debugging, and configuration
  • Enforces user-event over fireEvent, and flags anti-patterns such as class selectors, container.firstChild, and assertions inside findBy
  • Designed for React 19 projects on v16.1.0+ that write component, hook, or async UI tests with Jest-style matchers

Install

$ npx -y skills add itechmeat/llm-code --skill react-testing-library -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

React Testing Library Skill

Quick Navigation

TopicLink
Queriesreferences/queries.md
User Eventsreferences/user-events.md
APIreferences/api.md
Asyncreferences/async.md
Debuggingreferences/debugging.md
Configreferences/config.md

Installation

Install: npm install --save-dev @testing-library/react @testing-library/dom. Recommended extras: @testing-library/user-event and @testing-library/jest-dom. React 19 requires v16.1.0+.

Core Philosophy

"The more your tests resemble the way your software is used, the more confidence they can give you."

Avoid testing:

  • Internal state of components
  • Internal methods
  • Lifecycle methods
  • Child component implementation details

Test instead:

Details

Repository
github.com/itechmeat/llm-code
Categories
Testing & QA, Frontend & UI Code
First seen
May 16, 2026

More from itechmeat/llm-code

All 2

Similar to React Testing Library

More Testing & QA