enzyme-adapter-react-17-updated
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

enzyme-adapter-react-17-updated

Unofficial adapter for React 17 for [Enzyme]

Installation

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

or, if you're using Yarn:

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

Note for npm v7 users

enzyme's dependencies have not yet been updated to declare React 17 in peerDependencies. You need to add --legacy-peer-deps to the install command for it to work correctly.

Configuration

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-updated';

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

/enzyme-adapter-react-17-updated/

    Package Sidebar

    Install

    npm i enzyme-adapter-react-17-updated

    Weekly Downloads

    4,066

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    268 kB

    Total Files

    16

    Last publish

    Collaborators

    • anasamo92