-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/2139 jest snapshots #2233
Fix/2139 jest snapshots #2233
Conversation
🦋 Changeset detectedLatest commit: b6349ab The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit b6349ab:
|
c38a0ab
to
3688495
Compare
…t has css prop (cherry picked from commit 2c32d546ad206a2ab255ef93f7bdf2e2a136dcf7)
(cherry picked from commit 2a1a68424e8eb9a7c38b637f2a639024c667401b)
(cherry picked from commit 2460754) (cherry picked from commit 7d3eb7942f798621c2e374fc9fa0fae8b555dd16)
3688495
to
217312e
Compare
@@ -191,6 +204,25 @@ describe('enzyme', () => { | |||
cases | |||
) | |||
|
|||
test('child containing css array property', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this the correct test title? no css prop here holds an array
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated, as noted the titles got switched
@@ -143,6 +143,19 @@ const cases = { | |||
) | |||
} | |||
}, | |||
'using the css helper': { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OTOH this one holds an array so I would assume that maybe the added test titles should be swapped but I'm also not sure what "using the css helper" test would be about - could you make this test title a little bit more descriptive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, let me know if the new description is missing anything
What:
Fix #2139 - Snapshot serializer is not replacing hashes.
Why:
When creating snapshots for components that have an array as the css property, the snapshot was outputting some of the internal properties. Additionally, there was a problem with the serialization when using
mount
on components that had the css properties on child components.How:
Fixed a bug where the component wasn't being unwrapped properly (so its children were not being modified).
Accounted for the
css
prop being an array.Checklist: