
React19 test patterns
Guides migration of React test files to React 19 APIs and StrictMode behavior
React19 test patterns is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 41.7K
- Last commit
- License
- MIT
- Listing updated
Similar skills
About React19 test patterns
This skill is a reference for updating existing test files so they run under React 19. It groups the required changes into an ordered sequence, starting with moving act() to the react package and then replacing the removed Simulate helper with fireEvent from Testing Library. It also lists how the react-dom/test-utils functions map to Testing Library equivalents, such as render and getByRole, and notes which helpers can simply be deleted.
For StrictMode, the skill explains that React 19 no longer double-invokes effects in development, so spy counts on effects need lowering, while render-body calls still run twice. It recommends running the failing test and reading the actual call count from the output rather than adjusting numbers by guesswork. Async act wrapping for remaining warnings and a check on custom render helpers are included as later steps.
The patterns are written for Jest-style test runs and assume React Testing Library is in use for the replacement APIs.
When your agent uses it
Provides before/after patterns for migrating test files to React 19 compatibility, including act() imports, Simulate removal, and StrictMode call count changes.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 1 file (3 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
Copy the skill folder to ~/.claude/skills/react19-test-patterns to use it in all your projects:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/github/awesome-copilot.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/react19-test-patterns &&
cp -R "$tmp/skills/react19-test-patterns" ~/.claude/skills/react19-test-patterns &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/react19-test-patterns inside it instead.
Copy the skill folder to ~/.agents/skills/react19-test-patterns to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/github/awesome-copilot.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/react19-test-patterns &&
cp -R "$tmp/skills/react19-test-patterns" ~/.agents/skills/react19-test-patterns &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/react19-test-patterns inside it instead.
Copy the skill folder to ~/.cursor/skills/react19-test-patterns to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/github/awesome-copilot.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/react19-test-patterns &&
cp -R "$tmp/skills/react19-test-patterns" ~/.cursor/skills/react19-test-patterns &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/react19-test-patterns inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/github/awesome-copilot.git --path skills/react19-test-patternsOr copy the folder to ~/.gemini/skills/react19-test-patterns yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/react19-test-patterns:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/github/awesome-copilot.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/react19-test-patterns &&
cp -R "$tmp/skills/react19-test-patterns" ~/.copilot/skills/react19-test-patterns &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/react19-test-patterns inside it instead.
Get the folder:
git clone --depth 1 https://github.com/github/awesome-copilot.gitThen copy awesome-copilot/skills/react19-test-patterns into your agent's skills folder as react19-test-patterns. Agents that support SKILL.md read one folder per skill.
What it does
- act import relocation
- Shows how to move act() from react-dom/test-utils to the react package.
- Simulate to fireEvent swap
- Maps removed Simulate calls to equivalent Testing Library fireEvent calls.
- test-utils API map
- Lists each removed react-dom/test-utils helper and its modern replacement.
- StrictMode call count fixes
- Explains which effect and render call counts change under React 19 StrictMode.
- Measure-first test updates
- Recommends reading actual counts from a failing test run before editing assertions.
- Async act warning cleanup
- Covers wrapping remaining asynchronous updates to clear not-wrapped-in-act warnings.
Good for
- Migrate a test file that imports act from react-dom/test-utils to React 19
- Replace Simulate.click and Simulate.change calls with fireEvent in Jest tests
- Update toHaveBeenCalledTimes assertions for effects under StrictMode in React 19
- Clear 'not wrapped in act' warnings in React component tests
- Remove leftover renderIntoDocument and findRenderedDOMComponent helpers
React19 test patterns FAQ
What does React19 test patterns change in my code?
It guides edits to test files: imports of act move to react, Simulate calls become fireEvent calls, and StrictMode spy counts for effects are lowered to match React 19 behavior.
Which replacement libraries does React19 test patterns assume?
The replacement examples use @testing-library/react for render, fireEvent and query helpers.
Does React19 test patterns include any scripts?
No scripts are bundled. It shows a single npm test command that filters output to expected and received counts.
Should I change StrictMode counts by reasoning about React 19?
No. The skill advises running the failing test first and using the actual count reported in the output.
How do I install React19 test patterns in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/react19-test-patterns to use it in all your projects, or to .claude/skills/react19-test-patterns in one project.
Does React19 test patterns run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use React19 test patterns?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to React19 test patterns?
The closest alternatives to React19 test patterns are React19 concurrent patterns, React19 source patterns, React18 enzyme to rtl, React18 lifecycle patterns and React18 dep compatibility.
Where this comes from
- Description: from the skill's own SKILL.md.
More from github/awesome-copilot

A DevOps checklist for deploys, Docker, Kubernetes, CI/CD, rollback and mobile releases
- Open source
- 41.7K GitHub stars
- Cloud and infrastructure

Guides Qdrant scaling when data outgrows a node: tenants, time windows or sharding
- Open source
- 41.7K GitHub stars
- Knowledge and memory

Explains Qdrant's per-shard query subsampling for large limits across many auto-shards
- Open source
- 41.7K GitHub stars
- Knowledge and memory

Lets an agent build and edit Power Apps canvas apps through FlowStudio MCP
- Open source
- 41.7K GitHub stars
- Developer tools

Ground rules for an agent editing Power Apps canvas apps through FlowStudio MCP
- Open source
- 41.7K GitHub stars
- Developer tools

Lets an agent inspect, audit and diagnose Power Apps canvas apps via FlowStudio MCP
- Open source
- 41.7K GitHub stars
- Developer tools

