adriantoine / enzyme-to-json

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

snapshots are getting updated without passing update flag #132

Closed naisergic closed 5 years ago

naisergic commented 5 years ago

Hi currently we are facing an issue that snapshot of the component are getting updated even if we do not pass the update flag, due to which build gets passed to.

and if we do not use toJson then snapshot doesn't get updated

using enzyme:3.2.0, karma: 1.7.1 and enzyme-to-json@3.3.0

Version

library version
enzyme 3.2.0
react 16.4.1
react-dom 16.4.1
react-test-renderer
adapter (below)

Adapter

naisergic commented 5 years ago

i think this issue is related to enzyme as if i do not use toJson then also snapshot are getting updated without update flag

VincentLanglet commented 5 years ago

Enzyme-to-json can't update snapshot. It's a jest issue (or eventually enzyme). You should open an issue with a reproductible example.