Thanks for this article and thanks Jason as well for the clarification! Indeed my tests started failing because motion elements were being mocked as divs.
This is working for me with Framer Motion 5.6. Maybe one day I'll be as smart as you guys and be able to come up with a mock like this. Will have to copy-paste this for now. 😅
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I tried the above solution and overwriting AnimatePresence results in this error:
Error: Uncaught [TypeError: Cannot read property 'jsxDEV' of undefined]
I did some digging around and it looks like jsxDEV is from React. Any suggestions on how to resolve this?
Weird! Sorry nothing off the top of my head. I'll post here if I find anything.
Thanks for this article and thanks Jason as well for the clarification! Indeed my tests started failing because motion elements were being mocked as divs.
This is working for me with Framer Motion 5.6. Maybe one day I'll be as smart as you guys and be able to come up with a mock like this. Will have to copy-paste this for now. 😅