Agent skill · Testing & QA

react18-enzyme-to-rtl

Provides exact Enzyme → React Testing Library migration patterns for React 18 upgrades. Use this skill whenever Enzyme tests need to be rewritten - shallow, mount, wrapper.find(), wrapper.simulate(), wrapper.prop(), wrapper.state(), wrapper.instance(), Enzyme configure/Adapter calls, or any test file that imports from enzyme. This skill covers the full API mapping and the philosophy shift from implementation testing to behavior testing. Always read this skill before rewriting Enzyme tests - do not translate Enzyme APIs 1:1, that produces brittle RTL tests.

GitHub68,948★ · +463/wk · 2 repos on radarProfile →
copilotMIT
Install
npx skills add github/awesome-copilot --skill react18-enzyme-to-rtl --agent copilot

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

Facts
Files in the skill folder: 3
SKILL.md size: 4 KB
Bundled scripts: none
Path: skills/react18-enzyme-to-rtl/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 18 Enzyme → RTL Migration Enzyme has no React 18 adapter and no React 18 support path. All Enzyme tests must be rewritten using React Testing Library. ## The Philosophy Shift (Read This First) Enzyme tests implementation. RTL tests behavior. ```jsx // Enzyme: tests that the component has the right internal state expect(wrapper.state('count')).toBe(3); expect(wrapper.instance().handleClick).toBeDefined(); expect(wrapper.find('Button').prop('disabled')).toBe(true); // RTL: tests what the user actually sees and can do expect(screen.getByText('Count: 3')).toBeInTheDocument(); expect(screen.getByRole('button', { name: /submit/i })).toBeDisabled(); ``` This is not a 1:1 translation. Enzyme tests that verify internal state or instance methods don't have RTL equivalents - because RTL intentionally doesn't expose internals. **Rewrite the test to assert the visible outcome instead.** ## API Map For complete before/after code for each Enzyme API, read: - **`references/enzyme-api-map.md`** - full mapping: shallow, mount, find, simulate, prop, state, instance, configure - **`references/async-patterns.md`** - waitFor, findBy, act(), Apollo MockedProvider, loading states, error states ##

What's inside
Steps it walks through
  1. The Philosophy Shift (Read This First)
  2. API Map
  3. Core Rewrite Template
  4. RTL Query Priority (use in this order)
  5. Wrapping with Providers
Ships with 2 files
  • references/async-patterns.md
  • references/enzyme-api-map.md
More from awesome-copilot
All skills →
About this skill
What does the react18-enzyme-to-rtl skill do?

Provides exact Enzyme → React Testing Library migration patterns for React 18 upgrades. Use this skill whenever Enzyme tests need to be rewritten - shallow, mount, wrapper.find(), wrapper.simulate(), wrapper.prop(), wrapper.state(), wrapper.instance(), Enzyme configure/Adapter calls, or any test file that imports from enzyme. This skill covers the full API mapping and the philosophy shift from implementation testing to behavior testing. Always read this skill before rewriting Enzyme tests - do not translate Enzyme APIs 1:1, that produces brittle RTL tests.

How do I install it?

Run `npx skills add github/awesome-copilot --skill react18-enzyme-to-rtl --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