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
Improved reliability of snapshots by having consistent order of extracted rules (#1880)
* Fix inconsistent style ordering for snapshots
Due to jest writing styles in the order it encounters
rendered styled components across tests, an issue can
occur where skipping/removing/reordering your tests will
invalidate test snapshots.
This fix sorts the style elements when serializing emotion styles.
* Add changeset for @jest/emotion style sorting
* update snapshots for style reordering fix
* Rewrite style extraction in the serializer to be independent of the rules insertion order
Co-authored-by: Mateusz Burzyński <[email protected]>
Improved stability of the generated snapshots - styles are extracted now based on the order in which the associated with them class names appear in the serialized elements rather than based on the order of the actual rules in the document.
0 commit comments