testing-react
Skill106 starsChanged 4 months agoMITView on GitHub
Stratégie de Tests React 19 + Compiler 1.0. Use when writing tests, reviewing test coverage, or setting up testing.
In this repository60 other files it gives its agents.
- docs/AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- .claude/references/angular/CLAUDE.mdCLAUDE.md
- .claude/references/flutter/CLAUDE.mdCLAUDE.md
- .claude/references/laravel/CLAUDE.mdCLAUDE.md
- .claude/references/paperclip/CLAUDE.mdCLAUDE.md
- .claude/references/reactnative/CLAUDE.mdCLAUDE.md
- .claude/references/svelte/CLAUDE.mdCLAUDE.md
- .claude/references/symfony/CLAUDE.mdCLAUDE.md
- .claude/references/vite/CLAUDE.mdCLAUDE.md
- .claude/references/vuejs/CLAUDE.mdCLAUDE.md
- aggregatesSkill
- api-gatewaySkill
- architectSkill
- architecture-clean-dddSkill
- architectureSkill
- asyncSkill
- atomic-tasksSkill
- coding-standardsSkill
- cqrsSkill
- ddd-patternsSkill
- debug-methodicalSkill
- design-md-conventionSkill
- docker-hadolintSkill
- doctrine-extensionsSkill
- documentationSkill
- domain-eventsSkill
- dynamic-workflowsSkill
- ecosystem-toolsSkill
- edge-computingSkill
- event-drivenSkill
- git-workflowSkill
- graphqlSkill
- i18nSkill
- kiss-dry-yagniSkill
- monorepoSkill
- multitenantSkill
- navigationSkill
- observabilitySkill
- parallel-worktreesSkill
- performanceSkill
- quality-toolsSkill
- remotionSkill
- security-flutterSkill
- security-reactnativeSkill
- security-reactSkill
- securitySkill
- security-symfonySkill
- socratic-brainstormSkill
- solid-principlesSkill
- state-managementSkill
- testing-flutterSkill
- testing-pythonSkill
- testing-reactnativeSkill
- testingSkill
- testing-symfonySkill
- toolingSkill
- value-objectsSkill
- wasmSkill
- workflow-analysisSkill
The file
Files
Stratégie de Tests React 19 + Compiler 1.0
Versions : React 19.2+ | React Compiler 1.0 | Vitest 4.1+ | 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 4.1+ Browser Mode | Chromium/Firefox/WebKit natif |
| Component Testing | Playwright CT | Alternative à RTL — browser réel |
| E2E | Playwright | Flows utilisateur complets |
| Mutation | Stryker | Qualité des tests (score >= 80%) |
| Property-based | fast-check | Génération de cas de test |
Abandonner : JSDOM (lourd, incomplet) et React Testing Library (remplacé par Playwright CT).
Sources : Vitest 4, Playwright Component Testing, Stryker Mutator
Invariants non-négociables
- Vitest Browser Mode (provider: playwright) — pas de 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 workspaces pour monorepos (unit / browser séparés)
- 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
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

