You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 15, 2022. It is now read-only.
With chakra-button supposedly containing the default chakra styling and css-oqfhsh containing additional style information processed by emotion. Getting to know this additional style information is desirable since it allows for more subtle changes in colors to be detected that Chromatic doesn't seem to pick up.
How?
Following https://emotion.sh/docs/testing, this should be as easy as adding the @emotion/jest/serializer to the snapshotSerializer array, however in tests that didn't seem to suffice.
From my understanding the order of operations needs to be:
Preact renders story to object
Emotion serializer resolves the styles
Preact object is rendered to HTML
Emotion serializer replaces the styles
Step 2-4 should "just" function within the emotion serializer given that the correct snapshot serializer is used from the provided array, getting the story rendered to an object however has been proven to be a bigger issue in earlier attempts.
The text was updated successfully, but these errors were encountered:
Why
Currently snapshots look like this:
With
chakra-button
supposedly containing the default chakra styling andcss-oqfhsh
containing additional style information processed by emotion. Getting to know this additional style information is desirable since it allows for more subtle changes in colors to be detected that Chromatic doesn't seem to pick up.How?
Following https://emotion.sh/docs/testing, this should be as easy as adding the
@emotion/jest/serializer
to the snapshotSerializer array, however in tests that didn't seem to suffice.From my understanding the order of operations needs to be:
Step 2-4 should "just" function within the emotion serializer given that the correct snapshot serializer is used from the provided array, getting the story rendered to an object however has been proven to be a bigger issue in earlier attempts.
The text was updated successfully, but these errors were encountered: