Jest/Enzyme ShallowWrapper is empty when creating Snapshot Jest/Enzyme ShallowWrapper is empty when creating Snapshot reactjs reactjs

Jest/Enzyme ShallowWrapper is empty when creating Snapshot


There shouldn't be a need of reverting version. Following the official DOC

You need to add this to your Jest configuration:

"snapshotSerializers": ["enzyme-to-json/serializer"]

clue:could be as easy as add it to your package.json, like:

{  "name": "my-project",  "jest": {    "snapshotSerializers": ["enzyme-to-json/serializer"]  }}

Sorry if it wasn't the answer. I just saw no-one told it here and it must help other losts like me few minutes ago.


I faced the same issue after updating to jest@24.0.0I have reverted to the previous version jest@23.6.0 for the time being till i figure out what has changed. If you find what has changed, do post it here.