testing-react

testing-react is a skill for Claude Code from TheBeardedBearSAS/claude-craft. It costs 34 tokens per session (703 once invoked), scanned A, original, MIT.

A testing strategy for React 19 and the React Compiler. It covers component, browser, end-to-end, mutation, and property-based tests, including workspaces for monorepos.

In plain words
What is it for?
Use it when writing React tests, reviewing coverage, testing components in real browsers, or setting up tests in a monorepo.
Why use it?
It keeps tests focused on what users can see and do while accounting for browser behaviour and projects split into multiple packages.

Skill for Claude Code

Written for Claude Code: context: fork in frontmatter.

Part of the claude-craft plugin — 58 skills, 96 commands, 58 agents, 5 hooks shipped together

Good fit Use it when writing React tests, reviewing coverage, testing components in real browsers, or setting up tests in a monorepo.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/thebeardedbearsas/claude-craft/testing-react
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add TheBeardedBearSAS/claude-craft --skill testing-react
Clone the repo
git clone --depth 1 https://github.com/TheBeardedBearSAS/claude-craft

Made for: Claude Code.

Or install claude-craft, the plugin that ships this one along with the rest of its 58 skills, 96 commands, 58 agents, 5 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for testing-react

README.md
[![agentmods](https://agentmods.dev/badge/skills/thebeardedbearsas/claude-craft/testing-react/github.svg)](https://agentmods.dev/skills/thebeardedbearsas/claude-craft/testing-react)
Your own site
<a href="https://agentmods.dev/skills/thebeardedbearsas/claude-craft/testing-react"><img src="https://agentmods.dev/badge/skills/thebeardedbearsas/claude-craft/testing-react/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for testing-react

Your own site · 80×15
<a href="https://agentmods.dev/skills/thebeardedbearsas/claude-craft/testing-react"><img src="https://agentmods.dev/badge/skills/thebeardedbearsas/claude-craft/testing-react.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 703 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 44
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00034 $0.00703
Opus 5.5 $0.00014 $0.00281
Sonnet 5.5 $0.00007 $0.00141
Haiku 4.5 $0.00003 $0.00070

Measured 25d ago against content hash 949f46b2a392, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

testing-react scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 25d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/testing-react/SKILL.md · 49 lines

How it starts

The opening of the file, as written. The whole thing — 49 lines — stays where its author put it; the contents beside it link to each section on 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 projects pour monorepos (unit / browser séparés) — workspace renommé projects (3.2), fichier vitest.workspace non supporté en 4.x
  • MSW pour mocker les appels API (pas de fetch mocké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

Read the full file on GitHub · 49 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 25d ago Changed 949f46b2a392
  2. 1mo ago Changed · +2 lines · +2 tokens per session 9de38a11397f
  3. 3mo ago First seen · 47 lines · 32 tokens per session scan A 67ca5a057c7b

Subscribe to this mod's changes

testing-react is a skill published in the GitHub repository TheBeardedBearSAS/claude-craft (108 stars, last pushed 19d ago), licensed MIT. It adds 34 tokens to every session and 703 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

testing-react compared with skills from other repositories

testing-react next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
testing-reactTheBeardedBearSAS/claude-craftSkill10819d agoMITA34Claude Code
storybook-testingyonatangross/orchestkitSkill317todayMITA62Claude Code
agent-e2e-test-specialisttravisjneuman/.claudeSkill116todayMITA75Claude Code
generic-react-feature-developertravisjneuman/.claudeSkill116todayMITA53Claude Code
generic-react-ux-designertravisjneuman/.claudeSkill116todayMITA69Claude Code
generic-react-design-systemtravisjneuman/.claudeSkill116todayMITA59Claude Code
generic-react-code-reviewertravisjneuman/.claudeSkill116todayMITA71Claude Code