What problem does it solve?
Enzyme has no React 18 adapter, so every Enzyme test must be rewritten when upgrading to React 18. Translating Enzyme APIs 1:1 produces brittle tests because Enzyme tests implementation details while React Testing Library tests user-visible behavior.
Core Features & Use Cases
- Complete API Mapping: Provides before/after code for shallow, mount, wrapper.find(), simulate(), prop(), state(), instance(), and Enzyme configure/Adapter setup.
- Async Pattern Migration: Covers waitFor, findBy queries, act(), Apollo MockedProvider, loading states, and error states that replace wrapper.update() and manual promise flushing.
- Behavior-First Rewrites: Guides the philosophy shift from asserting internal state and instance methods to asserting rendered output via accessible queries like getByRole.
- Use Case: When upgrading a React 16/17 codebase to React 18, use this skill to rewrite a test file that imports from enzyme into an equivalent RTL test using render, screen, and userEvent.
Quick Start
Rewrite my Enzyme test file for the LoginForm component into a React Testing Library test compatible with React 18.