Loading...
Loading...
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.
npx skill4agent add pproenca/dot-skills react-testing-library| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 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 | |
| 8 | Debugging | LOW-MEDIUM | |
| 9 | Accessibility Testing | LOW | |
query-prefer-rolequery-avoid-testidquery-use-screenquery-label-text-formsquery-role-name-optionquery-get-vs-queryquery-within-scopeasync-findby-over-waitforasync-await-findbyasync-single-assertion-waitforasync-no-side-effects-waitforasync-waitfor-disappearanti-unnecessary-actanti-manual-cleanupanti-implementation-detailsanti-empty-waitforanti-container-queriesanti-redundant-rolesuser-prefer-usereventuser-setup-before-renderuser-await-interactionsuser-keyboard-for-special-keysuser-clear-before-typeassert-jest-dom-matchersassert-visible-over-in-documentassert-text-contentassert-have-valueassert-accessible-descriptionsetup-wrapper-providerssetup-custom-rendersetup-mock-modulessetup-fake-timerssetup-render-hookstruct-arrange-act-assertstruct-one-behavior-per-teststruct-descriptive-namesstruct-avoid-beforeeach-renderdebug-screen-debugdebug-logrolesdebug-testing-playgrounda11y-role-queries-verifya11y-verify-focusa11y-test-aria-states| File | Description |
|---|---|
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
| metadata.json | Version and reference information |