react-test-quality-review

Review React tests for behavioral coverage, assertion strength, mocking, and regression confidence.

2|Updated May 6, 2026
One-click install
npx skills add https://github.com/bpcakes/jig-skills --skill react-test-quality-review-bpcakes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-test-quality-review
Source: https://github.com/bpcakes/jig-skills/tree/main/plugins/jig-typescript/skills/react-test-quality-review
Command: npx skills add https://github.com/bpcakes/jig-skills --skill react-test-quality-review-bpcakes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? React test suites can pass while proving little: render-only smoke tests, snapshot-only coverage, over-mocked integrations, and assertions on mock calls instead of user-visible results let real regressions ship. This Skill reviews tests against the standard of whether they would fail when user-visible behavior breaks. ## Core Features & Use Cases - Behavioral Coverage Review: Evaluates Testing Library, Vitest/Jest, Storybook play, and Playwright component tests against the user-visible contract they claim to protect, with severity based on surviving regressions rather than checklist patterns. - Anti-Pattern Detection: Provides static scan patterns for test IDs, snapshots, fireEvent, mock-call waits, and shallow rendering, each treated as an investigation signal rather than an automatic finding. - Structured Findings Report: Produces findings with evidence, surviving regression, impact-based severity, counterevidence checked, and minimal repair, using the report contract in references/report-format.md. - Use Case: Point the Skill at a pull request adding a delete-confirmation modal test; it identifies that the snapshot and test-ID assertions would still pass if the confirm handler were removed, and supplies a userEvent-based replacement test. ## Quick Start Ask the agent to review the React tests in your current changes for behavioral coverage and report findings with file locations without editing code.

Frequently Asked Questions about react-test-quality-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review React tests for weak assertions?

Compare each test's claimed behavior against its actual assertions, checking whether it interacts through rendered UI and asserts user-visible results. Flag render-only checks, toBeTruthy-style assertions, and snapshot-only coverage only when a concrete regression would survive the suite.

What makes a good React Testing Library test?

A good test demonstrates observable behavior from the user's point of view: it would fail for the same reason a user would notice the breakage. Prefer role-based queries with accessible names, userEvent interactions, and assertions on final UI state.

Does this review work with Vitest and Playwright component tests?

Yes, the same user-visible standard applies to Vitest, Jest, Storybook play functions, and Playwright component tests. For Playwright, it checks user-facing locators, realistic provider mounting, and auto-waiting assertions on observable results.

When is a snapshot test acceptable in React?

Narrow, intentional snapshots can protect rendering contracts, and smoke tests have legitimate uses. A snapshot becomes a finding only when it is the sole protection for interactive behavior like forms, dialogs, or async flows and a real regression would survive.

Why is waiting on a mock call a test smell?

A mock call can complete before the UI finishes updating, so the test may pass while the user-visible result is wrong. Prefer waiting for the observable outcome with findBy queries or waitForElementToBeRemoved instead of waitFor on toHaveBeenCalled.