testing-react
БесплатноБез исполняемых скриптовНе проверенStratégie de Tests React 19.3 + Compiler 1.0. Use when writing tests, reviewing test coverage, or setting up testing.
от TheBeardedBearSAS★ 109 звёзд на GitHubОб этом скилле
Stratégie de Tests React 19 + Compiler 1.0
Versions : React 19.2+ | React Compiler 1.0 | Vitest 5 | Playwright
React Compiler 1.0 (auto-memoization) est transparent pour les tests — tester le comportement visible, jamais les optimisations internes.
Stack recommandée 2026
| Type | Outil | Usage |
|---|---|---|
| Unit/Composants | Vitest 5 Browser Mode | Chromium/Firefox/WebKit natif |
| Composants (navigateur) | vitest-browser-react | render + locators, intégré à Vitest Browser Mode |
| Component Testing | Playwright CT | Alternative à RTL — browser réel |
| Composants (JSDOM) | React Testing Library 16 | Toujours maintenu — pertinent pour les suites JSDOM existantes |
| E2E | Playwright | Flows utilisateur complets |
| Mutation | Stryker | Qualité des tests (score >= 80%) |
| Property-based | fast-check | Génération de cas de test |
Privilégier un vrai navigateur (Vitest Browser Mode, Playwright CT) plutôt que JSDOM (lourd, incomplet). React Testing Library 16 reste maintenu : l'utiliser pour les suites JSDOM existantes, ne pas migrer sans bénéfice.
Sources : Vitest Browser Mode, vitest-browser-react, Playwright Component Testing, Stryker Mutator
Invariants non-négociables
- Vitest Browser Mode (provider: playwright) pour les nouveaux tests composants — éviter JSDOM
- Tester le comportement (ce que voit l'utilisateur), pas l'implémentation
- Ne jamais tester les optimisations du React Compiler (memoization)
- Mutation score >= 80% via Stryker avant merge
- Vitest
projectspour monorepos (unit / browser séparés) —workspacerenomméprojects(3.2), fichiervitest.workspacenon supporté en 4.x - MSW pour mocker les appels API (pas de
fetchmockée à la main)
Checklist par type
| Type | Vérification |
|---|---|
| Composant | Vitest Browser Mode ou Playwright CT, interactions réelles |
| Hook | Vitest, renderHook si nécessaire |
| RSC | Test du rendu HTML retourné (pas de DOM) |
| E2E | Playwright, flows complets avec expect().toHaveURL() |
| Mutation | npx stryker run, seuil break >= 50, high >= 80 |
Détails complets, exemples de code, configs et checklists : voir REFERENCE.md
Установить testing-react в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл testing-react?
Stratégie de Tests React 19.3 + Compiler 1.0. Use when writing tests, reviewing test coverage, or setting up testing.
Как установить скилл testing-react?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл testing-react запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic