adriantoine / enzyme-to-json

Snapshot test your Enzyme wrappers
MIT License
947 stars 64 forks source link

Incorrect peer dependency version #122

Closed ersel closed 5 years ago

ersel commented 6 years ago

After the last update to enzyme-to-json 3.3.5 our tests started failing with a mixture of:

TypeError: Cannot read property '$$typeof' of undefined

and also

TypeError: Cannot convert a Symbol value to a string

These problems only occur if you're using an enzyme version 3.3.0 or earlier, so I believe peer dependency listed in package.json is no longer correct after the last update.

Enzyme peer dependency version should be ^3.4.0.

alanyinjs commented 5 years ago

Seems to be caused by this change: capture

ersel commented 5 years ago

What's your enzyme version @alanyinjs ?Try upgrading to a newer version if you are below 3.3.0.

alanyinjs commented 5 years ago

@ersel I am using enzyme@3.3.0. I'm just using enzyme-to-json@3.3.4 as a temporary fix 😄

ersel commented 5 years ago

You should upgrade enzyme to something higher than 3.3.0 @alanyinjs

RiccardoF commented 5 years ago

When I upgraded to 3.3.5 I still have the error: TypeError: Cannot read property '$$typeof' of undefined

With the version 3.3.4 is fine. @alanyinjs

mcguiretj18 commented 5 years ago

Updating to the latest enzyme package worked for me

VincentLanglet commented 5 years ago

https://github.com/adriantoine/enzyme-to-json/pull/123 is merged, I need to deploy a new version