Closed
Description
Current behavior:
Snapshot errors do not show only the changed styles or attributes of a styled component when using the snapshotSerializer.
To reproduce:
Here is a minimal repo I created with the snapshot failure committed. Simply install (I'm using yarn) and run yarn test
to see it.
emotion-snapshot-issue-reproduction
- Update snapshots
- Change any style or html attribute (such as the
id
value) - Snapshot will fail as expected but show that every style in the component has changed
Expected behavior:
Snapshots should only show diff lines for the things that changed in a component. This used to be the behavior for all our tests but at some point it changed. I'm sorry I can't figure out when, despite trying.
Environment information:
react
version: ^16.12.0@emotion/core
version: ^10.0.27@emotion/styled
version: ^10.0.2jest-emotion
version: ^10.0.27