Agent skill · Testing & QA

react19-test-patterns

Provides before/after patterns for migrating test files to React 19 compatibility, including act() imports, Simulate removal, and StrictMode call count changes.

GitHub68,948★ · +463/wk · 2 repos on radarProfile →
copilotMIT
Install
npx skills add github/awesome-copilot --skill react19-test-patterns --agent copilot

Same command for any agent — swap --agent for claude-code, codex, cursor.

Facts
Files in the skill folder: 1
SKILL.md size: 3 KB
Bundled scripts: none
Path: skills/react19-test-patterns/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 37,432 · +281 this week
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# React 19 Test Migration Patterns Reference for all test file migrations required by React 19. ## Priority Order Fix test files in this order; each layer depends on the previous: 1. **`act` import** fix first, it unblocks everything else 2. **`Simulate` → `fireEvent`** fix immediately after act 3. **Full react-dom/test-utils cleanup** remove remaining imports 4. **StrictMode call counts** measure actual, don't guess 5. **Async act wrapping** for remaining "not wrapped in act" warnings 6. **Custom render helper** verify once per codebase, not per test --- ## 1. act() Import Fix ```jsx // Before REMOVED in React 19: import { act } from 'react-dom/test-utils'; // After: import { act } from 'react'; ``` If mixed with other test-utils imports: ```jsx // Before: import { act, Simulate, renderIntoDocument } from 'react-dom/test-utils'; // After split the imports: import { act } from 'react'; import { fireEvent, render } from '@testing-library/react'; // replaces Simulate + renderIntoDocument ``` --- ## 2. Simulate → fireEvent ```jsx // Before Simulate REMOVED in React 19: import { Simulate } from 'react-dom/test-utils'; Simulate.click(element); Simulate.change(input, { target: { value: '

What's inside
Steps it walks through
  1. Priority Order
  2. 1. act() Import Fix
  3. 2. Simulate → fireEvent
  4. 3. react-dom/test-utils Full API Map
  5. 4. StrictMode Call Count Fixes
Commands it runs
Run the failing test, read the actual count from the error:
npm test -- --watchAll=false --testPathPattern="[filename]" --forceExit 2>&1 | grep -E "Expected|Received"
More from awesome-copilot
All skills →
About this skill
What does the react19-test-patterns skill do?

Provides before/after patterns for migrating test files to React 19 compatibility, including act() imports, Simulate removal, and StrictMode call count changes.

How do I install it?

Run `npx skills add github/awesome-copilot --skill react19-test-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From github/awesome-copilot, a repository with 37,432 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going