enzyme-to-json: Package is broken with enzyme 2.8.1
Using the latest enzyme master, which includes fixes for React 15.5 raises the following error when running tests:
Cannot find module 'enzyme/build/ShallowWrapper' from 'utils.js'
I’ll see if I can raise a PR to fix this once I figure out where the ShallowWrapper has moved to
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 17 (9 by maintainers)
Great, I’ll give that a go tomorrow, thanks
Yeah I have just tried that actually:
package.jsondependency toairbnb/enzymenpm installcd node_modules/enzymenpm installnpm run buildThen run your test again and it should work.
I’m closing this but feel free to comment here if it doesn’t work once they’ve released that new version!
Hi,
Thanks for the report, I’ll have a look!