react-testing-library
React Testing Library best practices for writing maintainable, user-centric tests.
Skill by pproenca
Chalk Labs
Need help deploying react-testing-library?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/pproenca-react-testing-library
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: frontend, testing, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/react-testing-library
What's inside
- Skill name
react-testing-library- Description
- React Testing Library best practices for writing maintainable, user-centric tests. Use when writing, reviewing, or refactoring RTL tests. Triggers on test files, testing patterns, getBy/queryBy queries, userEvent, waitFor, and component testing.
- License
- MIT
- Instructions
- 115 lines in SKILL.md · view on GitHub
Files (48)
- README.md
- SKILL.md
- _template.md · assets/templates/
- metadata.json
- _sections.md · references/
- a11y-role-queries-verify.md · references/
- a11y-test-aria-states.md · references/
- a11y-verify-focus.md · references/
- anti-container-queries.md · references/
- anti-empty-waitfor.md · references/
- anti-implementation-details.md · references/
- anti-manual-cleanup.md · references/
- anti-redundant-roles.md · references/
- anti-unnecessary-act.md · references/
- assert-accessible-description.md · references/
- assert-have-value.md · references/
- assert-jest-dom-matchers.md · references/
- assert-text-content.md · references/
- assert-visible-over-in-document.md · references/
- async-await-findby.md · references/
- async-findby-over-waitfor.md · references/
- async-no-side-effects-waitfor.md · references/
- async-single-assertion-waitfor.md · references/
- async-waitfor-disappear.md · references/
- debug-logroles.md · references/
- debug-screen-debug.md · references/
- debug-testing-playground.md · references/
- query-avoid-testid.md · references/
- query-get-vs-query.md · references/
- query-label-text-forms.md · references/
- query-prefer-role.md · references/
- query-role-name-option.md · references/
- query-use-screen.md · references/
- query-within-scope.md · references/
- setup-custom-render.md · references/
- setup-fake-timers.md · references/
- setup-mock-modules.md · references/
- setup-render-hook.md · references/
- setup-wrapper-providers.md · references/
- struct-arrange-act-assert.md · references/
- struct-avoid-beforeeach-render.md · references/
- struct-descriptive-names.md · references/
- struct-one-behavior-per-test.md · references/
- user-await-interactions.md · references/
- user-clear-before-type.md · references/
- user-keyboard-for-special-keys.md · references/
- user-prefer-userevent.md · references/
- user-setup-before-render.md · references/
SKILL.md (first lines)
# React Testing Library Best Practices Comprehensive testing guide for React components using Testing Library, designed for AI agents and LLMs. Contains 43 rules across 9 categories, prioritized by impact to guide test writing and code review. ## When to Apply Reference these guidelines when: - Writing new component tests with React Testing Library - Selecting queries (getByRole, getByLabelText, etc.) - Handling async operations in tests (findBy, waitFor) - Simulating user interactions (userEvent) - Reviewing tests for anti-patterns and implementation detail testing ## Rule Categories by Priority | Priority | Category | Impact | Prefix | |----------|----------|--------|--------| | 1 | Query Selection | CRITICAL | `query-` | | 2 | Async Handling | CRITICAL | `async-` | | 3 | Common Anti-Patterns | CRITICAL | `anti-` | | 4 | User Interaction | HIGH | `user-` | | 5 | Assertions | HIGH | `assert-` | | 6 | Component Setup | MEDIUM | `setup-` | | 7 | Test Structure | MEDIUM | `struct-` | | 8 | Debugging | LOW-MEDIUM | `debug-` | | 9 | Accessibility Testing | LOW | `a11y-` | ## Quick Reference ### 1. Query Selection (CRITICAL) - [`query-prefer-role`](references/query-prefer-role.md) - Prefer getByRole over other queries - [`query-avoid-testid`](references/query-avoid-testid.md) - Avoid getByTestId as primary query - [`query-use-screen`](references/query-use-screen.md) - Use screen for queries - [`query-label-text-forms`](references/query-label-text-forms.md) - Use getByLabelText for form fields - [`query-role-name-option`](references/query-role-name-option.md) - Use name option with getByRole - [`query-get-vs-query`](references/query-get-vs-query.md) - Use getBy for present, queryBy for absent - [`query-within-scope`](references/query-within-scope.md) - Use within() to scope queries ### 2. Async Handling (CRITICAL) - [`async-findby-over-waitfor`](references/async-findby-over-waitfor.md) - Use findBy instead of waitFor + getBy - [`async-await-findby`](references/async-await-findby.md) - Always await findBy queries - [`async-single-assertion-waitfor`](references/async-single-assertion-waitfor.md) - Single assertion in waitFor - [`async-no-side-effects-waitfor`](references/async-no-side-effects-waitfor.md) - Avoid side effects in waitFor - [`async-waitfor-disappear`](references/async-waitfor-disappear.md) - Use waitForElementToBeRemoved ### 3. Common Anti-Patterns (CRITICAL) - [`anti-unnecessary-act`](references/anti-unnecessary-act.md) - Avoid unnecessary act() wrapping - [`anti-manual-cleanup`](references/anti-manual-cleanup.md) - Remove manual cleanup calls - [`anti-implementation-details`](references/anti-implementation-details.md) - Avoid testing implementation details - [`anti-empty-waitfor`](references/anti-empty-waitfor.md) - Avoid empty waitFor callbacks - [`anti-container-queries`](references/anti-container-queries.md) - Avoid using container for queries - [`anti-redundant-roles`](references/anti-redundant-roles.md) - Avoid adding redundant ARIA roles ### 4. User Interaction (HIGH) - [`user-prefer-userevent`](references/user-prefer-userevent.md) - Use userEvent over fireEvent - [`user-setup-before-render`](references/user-setup-before-render.md) - Setup userEvent before render - [`user-await-interactions`](references/user-await-interactions.md) - Always await userEvent interactions - [`user-keyboard-for-special-keys`](references/user-keyboard-for-special-keys.md) - Use keyboard() for special keys - [`user-clear-before-type`](references/user-clear-before-type.md) - Use clear() before retyping ### 5. Assertions (HIGH) - [`assert-jest-dom-matchers`](references/assert-jest-dom-matchers.md) - Use jest-dom matchers - [`assert-visible-over-in-document`](references/assert-visible-over-in-document.md) - Use toBeVisible() for visibility - [`assert-text-content`](references/assert-text-content.md) - Use toHaveTextContent() for text - [`assert-have-value`](references/assert-have-value.md) - Use toHaveValue() for inputs - [`assert-accessible-description`](references/assert-accessible-description.md) - Use toHaveAccessibleDescription() ### 6. Component Setup (MEDIUM) - [`setup-wrapper-providers`](references/setup-wrapper-providers.md) - Use wrapper option for providers - [`setup-custom-render`](references/setup-custom-render.md) - Create custom render with providers - [`setup-mock-modules`](references/setup-mock-modules.md) - Mock modules at module level - [`setup-fake-timers`](references/setup-fake-timers.md) - Configure userEvent with fake timers - [`setup-render-hook`](references/setup-render-hook.md) - Use renderHook for testing hooks ### 7. Test Structure (MEDIUM) - [`struct-arrange-act-assert`](references/struct-arrange-act-assert.md) - Follow Arrange-Act-Assert pattern - [`struct-one-behavior-per-test`](references/struct-one-behavior-per-test.md) - Test one behavior per test - [`struct-descriptive-names`](references/struct-descriptive-names.md) - Use descriptive test names - [`struct-avoid-beforeeach-render`](references/struct-avoid-beforeeach-render.md) - Avoid render() in beforeEach ### 8. Debugging (LOW-MEDIUM) - [`debug-screen-debug`](references/debug-screen-debug.md) - Use screen.debug() to inspect DOM - [`debug-logroles`](references/debug-logroles.md) - Use logRoles to find available roles - [`debug-testing-playground`](references/debug-testing-playground.md) - Use Testing Playground for queries ### 9. Accessibility Testing (LOW) - [`a11y-role-queries-verify`](references/a11y-role-queries-verify.md) - Role queries verify accessibility - [`a11y-verify-focus`](references/a11y-verify-focus.md) - Test focus management - [`a11y-test-aria-states`](references/a11y-test-aria-states.md) - Test ARIA states and properties ## How to Use Read individual reference files for detailed explanations and code examples: - [Section definitions](references/_sections.md) - Category structure and impact levels - [Rule template](assets/templates/_template.md) - Template for adding new rules ## Reference Files | File | Description | |------|-------------| | [references/_sections.md](references/_sections.md) | Category definitions and ordering | | [assets/templates/_template.md](assets/templates/_template.md) | Template for new rules | | [metadata.json](metadata.json) | Version and reference information |
From pproenca/dot-skills, MIT.
More from pproenca/dot-skills
- 0.694score
tanstack-query
community
TanStack Query v5 performance optimization for data fetching, caching, mutations, and query patterns.
SkillCFreshness: C★ 218Claude Code +9 - 0.596score
mlflow-3
pproenca
MLflow 3 (open-source, pinned to 3.15) for classic-ML MLOps — logging and registering models, promoting versions across dev/staging/prod, standing up a…
SkillBFreshness: B★ 218Claude Code +9 - 0.596score
ray
pproenca
Production Ray (open-source, pinned to 2.57) for classic-ML workloads from training to serving — Ray Train, Tune, Data, Serve, Core, and cluster deployment on…
SkillBFreshness: B★ 218Claude Code +9 - 0.596score
mlflow-mlops-migration
pproenca
Guided workflow for taking any ML codebase — including one with no experiment tracking at all, or one full of MLflow 2-era idioms — to a production-grade…
SkillBFreshness: B★ 218Claude Code +9 - 0.596score
ray-llm
pproenca
LLM workloads on open-source Ray (pinned to 2.57) — OpenAI-compatible serving with ray.serve.llm (vLLM-backed LLMConfig + build_openai_app) and batch…
SkillBFreshness: B★ 218Claude Code +9 - 0.550score
expo-ui
pproenca
Library reference for @expo/ui SwiftUI components on iOS — covers Host boundaries, modifier composition, iOS 26 Liquid Glass and Human Interface Guidelines…
SkillCFreshness: C★ 218Claude Code +9 - 0.550score
debug
pproenca
Comprehensive debugging methodology for finding and fixing bugs (formerly debugging).
SkillCFreshness: C★ 218Claude Code +9 - 0.550score
bug-review
pproenca
Use this skill when a user asks to review a pull request for bugs, wants AI code review focused on correctness issues, or runs /bug-review.
SkillCFreshness: C★ 218Claude Code +9 - 0.550score
ios-taste
pproenca
Designs iOS 18+ SwiftUI experiences with real taste — starting from user goals, not pixels.
SkillCFreshness: C★ 218Claude Code +9 - 0.550score
implementation-functional-patterns
pproenca
TypeScript's functional answers to the 22 Gang of Four classes — factory functions (Factory Method, Abstract Factory, Prototype, Memento), module-scope…
SkillCFreshness: C★ 218Claude Code +9 - 0.550score
expo
pproenca
Expo React Native performance optimization guidelines.
SkillCFreshness: C★ 218Claude Code +9 - 0.550score
deterministic-metric-design
pproenca
Inventing deterministic metrics — turning a fuzzy property like 'maintainability', 'risk', or 'how reducible this code is' into a deterministic, computable…
SkillCFreshness: C★ 218Claude Code +9
Signals
- Stars
- 218
- Forks
- 19
- Open issues
- 3
- Last commit (this folder)
- May 27, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/pproenca/dot-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from pproenca
- 0.596score
ray-llm
pproenca
LLM workloads on open-source Ray (pinned to 2.57) — OpenAI-compatible serving with ray.serve.llm (vLLM-backed LLMConfig + build_openai_app) and batch…
SkillBFreshness: B★ 218Claude Code +9 - 0.596score
mlflow-mlops-migration
pproenca
Guided workflow for taking any ML codebase — including one with no experiment tracking at all, or one full of MLflow 2-era idioms — to a production-grade…
SkillBFreshness: B★ 218Claude Code +9 - 0.596score
mlflow-3
pproenca
MLflow 3 (open-source, pinned to 3.15) for classic-ML MLOps — logging and registering models, promoting versions across dev/staging/prod, standing up a…
SkillBFreshness: B★ 218Claude Code +9 - 0.596score
ray
pproenca
Production Ray (open-source, pinned to 2.57) for classic-ML workloads from training to serving — Ray Train, Tune, Data, Serve, Core, and cluster deployment on…
SkillBFreshness: B★ 218Claude Code +9 - 0.550score
expo
pproenca
Expo React Native performance optimization guidelines.
SkillCFreshness: C★ 218Claude Code +9 - 0.550score
debug
pproenca
Comprehensive debugging methodology for finding and fixing bugs (formerly debugging).
SkillCFreshness: C★ 218Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get react-testing-library running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
react-testing-library skill. Agent Mart. https://agentmart.dev/skills/pproenca-react-testing-library (last updated 2026-10-24)