I'm using Storyshots with storybook for snapshot testing. Referred to the documentation here: link1, link2
Followed all the steps here, but don't know why the error is coming :)
You can find the code here
I have also searched on the internet for possible solutions but didn't find any solution which helps.
Can someone please tell me how to fix this issue?
I also had this error when I was using this
jest.config.ts
:It was because of the wrong testEnvironment. Using
jest-environment-jsdom
(it should be installed separately) instead ofnode
fixed the problem.