/enzyme-adapter-react-17

enzyme-adapter-react-17

Primary LanguageJavaScriptMIT LicenseMIT

enzyme-adapter-react-17

Unofficial adapter for React 17 for Enzyme.

Installation

npm install --save-dev enzyme-adapter-react-17

or, if you're using Yarn:

yarn add --dev enzyme-adapter-react-17

Finally, you need to configure enzyme to use the adapter you want it to use. To do this, you can use the top level configure(...) API.

import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-17';

Enzyme.configure({ adapter: new Adapter() });