Skip to content
Back to skills

React Testing

ASecurity

Test patterns for a plain-JavaScript React frontend (no TypeScript) — everything the web-testing skill teaches, minus the type-level pieces. Load when writing or fixing frontend tests in a react-js project.

  • 13 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 6, 2026
developmentjavascripttypescriptjavareacttestingfrontend

Works with

  • cli

Security analysis

A100/100

Scanned November 6, 2026

npx -y skills add MiladNalbandi/keel-v2 --skill react-testing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of React Testing?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for React Testing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/miladnalbandi-react-testing/badge)](https://www.skillsdirectory.com/skills/miladnalbandi-react-testing)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: react-testing
description: Test patterns for a plain-JavaScript React frontend (no TypeScript) — everything the web-testing skill teaches, minus the type-level pieces. Load when writing or fixing frontend tests in a react-js project.
user-invocable: false
---

# Plain-JS React test patterns

This is `web-testing` with TypeScript removed. **Read `web-testing` first** — the file
classification rules, the colocation layout, AC tagging, MSW-against-the-contract testing, and
the assertion table are identical for a plain-JS React project. Everything below is only the
delta.

## What's different

| `web-testing` says | Here, instead |
|---|---|
| A test file ends `.test.ts` / `.test.tsx` / `.spec.ts` / `.spec.tsx` | `.test.js` / `.test.jsx` / `.spec.js` / `.spec.jsx` — same suffix rule, same `__tests__/` trap, just the JS extensions |
| Parse responses with the generated zod schema | There is no generated type layer to validate against. Assert the response shape directly in the test — the fields the AC names, and nothing the AC does not |
| "Types and the client come from the contract" | Only the client comes from the contract. Call its exported functions the same way; there is no compiler to catch a renamed field, so the test asserting the shape is what stands in for that check |
| `vitest.config.ts`, `test/setup.ts` | `vitest.config.js`, `test/setup.js` — same file, same role, `.js` extension |

## The one thing worth being stricter about, precisely because nothing else will catch it

Without a type checker, a response-shape assertion is the **only** thing that notices a
contract change reached this component. Do not skip it because "the component obviously uses
`.url`" — write the assertion, so a renamed field fails here instead of silently rendering
`undefined` in production.

## Rules keel enforces

Identical to `web-testing`'s: RED locks source files, GREEN locks tests, and `.skip(`,
`.only(`, `xit(`, `test.fixme` are weakened tests that review blocks, regardless of file extension.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.