DEV Community

Discussion on: 2020 Complete Setup for Storybook, Nextjs, Typescript, SCSS and Jest

Collapse
 
invasionofsmallcubes profile image
Emanuele Ianni

First of all thank you for the guide. Unfortunately enzyme doesn't have an adapter for React 17. Do you know any alternatives?

I'm getting
TypeError: Cannot read property 'child' of undefined

When executing this line:
const wrap = mount();

Collapse
 
invasionofsmallcubes profile image
Emanuele Ianni

Hopefully they will publish an update github.com/enzymejs/enzyme/pull/2430

Collapse
 
faisalali19 profile image
Faisal Ali Sayyed

You can add "@wojtekmaj /enzyme-adapter-react-17" as your dev dependencies and replace it with "enzyme-adapter-react-16" in the config/setup.js file.