react-testing

react-testing is an agent for Claude Code from bdfinst/agentic-dev-team. It costs 20 tokens per session (492 once invoked), scanned A, original, MIT.

A guide for testing React components with Testing Library, a tool that checks user-visible behaviour rather than private implementation details. It reviews queries, asynchronous updates, hooks, and common test anti-patterns.

In plain words
What is it for?
Use it to review React test files, including element queries, unnecessary act calls, async waits, shallow rendering, and implementation-detail assertions.
Why use it?
It helps tests verify what users can do instead of merely matching internal code structure, reducing tests that pass while the component is broken.

Agent for Claude Code

Written for Claude Code: effort in frontmatter.

Part of the dev-team plugin — 98 skills, 54 agents, 4 hooks shipped together

Good fit Use it to review React test files, including element queries, unnecessary act calls, async waits, shallow rendering, and implementation-detail assertions.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/bdfinst/agentic-dev-team/react-testing
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.

Clone the repo
git clone --depth 1 https://github.com/bdfinst/agentic-dev-team

Made for: Claude Code.

Or install dev-team, the plugin that ships this one along with the rest of its 98 skills, 54 agents, 4 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 react-testing

README.md
[![agentmods](https://agentmods.dev/badge/agents/bdfinst/agentic-dev-team/react-testing/github.svg)](https://agentmods.dev/agents/bdfinst/agentic-dev-team/react-testing)
Your own site
<a href="https://agentmods.dev/agents/bdfinst/agentic-dev-team/react-testing"><img src="https://agentmods.dev/badge/agents/bdfinst/agentic-dev-team/react-testing/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 react-testing

Your own site · 80×15
<a href="https://agentmods.dev/agents/bdfinst/agentic-dev-team/react-testing"><img src="https://agentmods.dev/badge/agents/bdfinst/agentic-dev-team/react-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 492 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.
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.00020 $0.00492
Opus 5.5 $0.00008 $0.00197
Sonnet 5.5 $0.00004 $0.00098
Haiku 4.5 $0.00002 $0.00049

Measured 1mo ago against content hash 5ba512f6a1e9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

react-testing 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 1mo 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.

plugins/dev-team/templates/agents/react-testing.md · 62 lines

What it actually says

React Testing

Output JSON:

{"status": "pass|warn|fail|skip", "issues": [{"severity": "error|warning|suggestion", "confidence": "high|medium|none", "file": "", "line": 0, "message": "", "suggestedFix": ""}], "summary": ""}

Status: pass=good test practices, warn=anti-patterns detected, fail=tests give false confidence Severity: error=test doesn't verify behavior, warning=anti-pattern, suggestion=improvement opportunity Confidence: high=mechanical (remove unnecessary act(), use getByRole); medium=test design judgment; none=requires domain context

Context needs: full-file File scope: *.test.ts, *.test.tsx, *.spec.ts, *.spec.tsx

Activates when

react or react-dom in package.json dependencies.

Skip

Return skip when no test files for React components in the changeset.

Detect

Testing Library best practices:

  • Using getByTestId when getByRole, getByLabelText, or getByText would work
  • Wrapping non-async operations in act() unnecessarily
  • Using container.querySelector instead of Testing Library queries
  • Missing waitFor for async state updates

Anti-patterns:

  • Testing implementation details (internal state, method calls)
  • Shallow rendering (enzyme.shallow) — test behavior, not component tree
  • Snapshot tests as the only assertion (fragile, low signal)
  • Mocking too many internals — test the component as a user would use it

Hook testing:

  • Testing hooks through implementation rather than through a component
  • Missing renderHook for custom hooks that don't render UI
  • Not wrapping state updates in act() when testing hooks directly

Assertions:

  • Missing assertions (test runs but doesn't verify anything)
  • Asserting on implementation artifacts instead of user-visible behavior
  • toMatchSnapshot without more specific assertions alongside it

Ignore

Unit tests for non-React code, E2E tests, API tests (handled by other agents).

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. 1mo ago First seen · 62 lines · 20 tokens per session scan A 5ba512f6a1e9

Subscribe to this mod's changes

react-testing is an agent published in the GitHub repository bdfinst/agentic-dev-team (299 stars, last pushed 9d ago), licensed MIT. It adds 20 tokens to every session and 492 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-05.

Related

Other agents, from other repositories

react18-test-guardian

Test suite fixer and verifier for React 16/17 → 18.3.1 migration. Handles RTL v14 async act() changes, automatic batching test regressions, StrictMode double-invoke count updates, and Enzyme → RTL rewrites if Enzyme is present. Loops until zero test failures. Invoked as subagent by react18-commander.

github/awesome-copilot · 81 tokens

test-healer

Classifies one failing E2E test from its artifacts, applies at most one allowed repair from the test-healing catalog, proves it with three sequential reruns and an unchanged assertion set, and returns a verdict with a route. Use per failure inside test-loop; never for production code changes.

HoangNguyen0403/agent-skills-standard · 63 tokens

integration-test-generator

Generates one integration/E2E test from an approved test case spec using existing project patterns. Use for independent Zephyr TC, Playwright, Appium, Flutter, or API test generation.

HoangNguyen0403/agent-skills-standard · 43 tokens

testid-inserter

Inserts stable test ids into production components for each selector gap named by a test plan, following the per-framework insertion policy and never renaming existing ids. Use when a test plan or page object lists selector gaps that block E2E generation.

HoangNguyen0403/agent-skills-standard · 55 tokens

test-planner

Turns approved AC/SRS into an executable test plan (scenarios, seed, selector gaps) for the test-loop workflow. Use for independent test-plan generation from stable requirements.

HoangNguyen0403/agent-skills-standard · 39 tokens

test-gap-finder

Finds missing, weak, or stale test coverage in a diff. Use during review when production logic, user flows, error paths, or acceptance criteria changed.

HoangNguyen0403/agent-skills-standard · 37 tokens