Snapshot tests className with emotion/styled

Viewed 602

Using react, jest, react-testing-library, emotion

Everytime I update a component the className in my snapshot tests updates because of how emotion/styled uses hash for classNames.

enter image description here

This keeps breaking my snapshot tests. Is it possible to make the classNames more static for testing?

I found this https://emotion.sh/docs/testing but it kinda does the opposite of what I want with adding the css to the snapshot tests..

0 Answers
Related