Przejdź do treści
Biblioteka skilli
Programowanie · Testowanie

react-component-testing

/react-component-testing

Pomaga pisać i przeglądać testy komponentów React: propsy, callbacki, stan kontrolowany, formularze i dostępność.

Repozytorium
qualcomm-ui ↗
Licencja
BSD-3-Clause
Ostatnia zmiana repozytorium
21.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
2
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 21.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

BSD-3-Clause, otwarta.

Co robi i kiedy

Pomaga pisać i przeglądać testy komponentów React: propsy, callbacki, stan kontrolowany, formularze i dostępność.

Oryginalny opis (EN)

Use when writing, reviewing, or refactoring React component tests, especially tests for props, callbacks, controlled state, children, accessibility, form behavior, or multiple public component API variants.

Jak działa

  1. Required References
  2. React Component Workflow
  3. React Component Rejections
  4. Self-Review Grep
Sekcje z nagłówków SKILL.md, w oryginale · 36 linii, 201 słów
Podgląd SKILL.md
---
name: react-component-testing
description: Use when writing, reviewing, or refactoring React component tests, especially tests for props, callbacks, controlled state, children, accessibility, form behavior, or multiple public component API variants.
---

# React Component Testing

Use this skill for React component test writing and review. Component tests should prove public component behavior, not the current DOM or child component implementation.

## Required References

Before writing or reviewing React component tests, read:

- `references/behavior-testing.md`
- `references/component-testing.md`
- `references/vitest-browser-testing.md` when the suite uses Vitest Browser Mode

## React Component Workflow

1. Identify props, callbacks, controlled/uncontrolled state, children or render props, accessibility, user interactions, forms, and public API variants.
2. Follow the local React test stack and its render/query helpers.
3. Assert callback payloads only after public user interaction.
4. Run shared behavior assertions across public API variants when those variants claim the same behavior.

## React Component Rejections

In addition to the shared references, reject:

- Child component internals. A parent test must not inspect a child's private markup to prove parent behavior.
- React state-machine plumbing, generated context internals, or render-prop internals when visible output can prove the contract.
- Icon/SVG internals such as `path`, `viewBox`, or generated icon markup. Use visible text stand-ins, accessible names, or lower-level icon tests.

## Self-Review Grep

Run this against changed React component test files and justify or rewrite every hit:

```shell
rg -n "querySelector|childNodes|compareDocumentPosition|getBoundingClientRect|data-state|data-focus|data-highlighted|data-disabled|data-.*part|toHaveClass|viewBox|getByTestId" <test-files>
```
Pliki w paczce (2)
  • SKILL.md 2 KB
  • agents/openai.yaml 1 KB

Wersje

W bazie nie ma innych skilli o nazwie react-component-testing.

Migawka bazy z 13.11.2026 · wersja paczki 708f337a9d5b (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100behavior-focused-react-testing
    Pomaga pisać i refaktoryzować testy komponentów React tak, by sprawdzały publiczne zachowanie, a nie szczegóły implementacji, w pakietach frameworka React.
  • 100react-conventions
    Podpowiada konwencje pisania komponentów React 19: propsy, JSX, strukturę komponentów i efekty, także przy przeglądzie.
  • 100angular-component-testing
    Pomaga pisać, recenzować i refaktoryzować testy komponentów i dyrektyw Angulara: wejścia, wyjścia, zachowanie hosta, formularze, dostępność i zachowania oparte na sygnałach.
  • 100react-development
    Pomaga pisać i przeglądać komponenty, hooki, zarządzanie stanem, formularze, wydajność renderowania i testy komponentów React.
  • 100react-typescript
    Pomaga budować, debugować i testować interfejsy React z TypeScript: formularze, stan, ładowanie danych i dostępność.
  • 100react-testing
    Opisuje testowanie komponentów React z Testing Library i Vitest: testy jednostkowe i integracyjne, asynchroniczne, mockowanie, zdarzenia użytkownika i dostępność.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.