Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

react-testing-library

БесплатноБез исполняемых скриптовНе проверен

React Testing Library best practices for writing maintainable, user-centric tests. Use when writing, reviewing, or refactoring RTL tests. Triggers on test…

pproencaот pproenca★ 231 звезда на GitHub

Об этом скилле

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)

2. Async Handling (CRITICAL)

3. Common Anti-Patterns (CRITICAL)

4. User Interaction (HIGH)

5. Assertions (HIGH)

6. Component Setup (MEDIUM)

7. Test Structure (MEDIUM)

Полный SKILL.md на GitHub

Установить react-testing-library в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

README.mdassets/templates/_template.mdmetadata.jsonreferences/_sections.mdreferences/a11y-role-queries-verify.mdreferences/a11y-test-aria-states.mdreferences/a11y-verify-focus.mdreferences/anti-container-queries.mdreferences/anti-empty-waitfor.mdreferences/anti-implementation-details.mdreferences/anti-manual-cleanup.mdreferences/anti-redundant-roles.mdreferences/anti-unnecessary-act.mdreferences/assert-accessible-description.mdreferences/assert-have-value.mdreferences/assert-jest-dom-matchers.mdreferences/assert-text-content.mdreferences/assert-visible-over-in-document.mdreferences/async-await-findby.mdreferences/async-findby-over-waitfor.mdreferences/async-no-side-effects-waitfor.mdreferences/async-single-assertion-waitfor.mdreferences/async-waitfor-disappear.mdreferences/debug-logroles.mdreferences/debug-screen-debug.mdreferences/debug-testing-playground.mdreferences/query-avoid-testid.mdreferences/query-get-vs-query.mdreferences/query-label-text-forms.mdreferences/query-prefer-role.mdreferences/query-role-name-option.mdreferences/query-use-screen.mdreferences/query-within-scope.mdreferences/setup-custom-render.mdreferences/setup-fake-timers.mdreferences/setup-mock-modules.mdreferences/setup-render-hook.mdreferences/setup-wrapper-providers.mdreferences/struct-arrange-act-assert.mdreferences/struct-avoid-beforeeach-render.md

FAQ

Что делает скилл react-testing-library?

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.

Как установить скилл react-testing-library?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл react-testing-library запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить react-testing-library с