Skip to content
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

Framework: upgrade enzyme #19448

Merged
merged 10 commits into from
Nov 3, 2017
Merged

Framework: upgrade enzyme #19448

merged 10 commits into from
Nov 3, 2017

Conversation

samouri
Copy link
Contributor

@samouri samouri commented Nov 2, 2017

summary
As part of wp-calypso's upgrade to React 16, we need update Calypso's enzyme dependency to 3.x. 3.0 comes with some breaking changes -- notably around the behavior of updates to mounted components, the usage of refs, and a few others.

For the most part I was able to follow the lead of work done in gutenberg and the official migration docs.

Most of these commits were cherry-picked from the React 16 PR. Thank you @gziolo for cleaning up much of the test-harness code and also updating the snapshots to be 1% of their original size :). I was finally able to get the test suite to run in under 70 seconds!

Note: Between the 16 and 15 adapter there were 6 breaking tests. We'll need to add those fixes back in the 16 upgrade branch.

@matticbot
Copy link
Contributor

@samouri samouri mentioned this pull request Nov 2, 2017
10 tasks
@samouri samouri self-assigned this Nov 2, 2017
@samouri samouri added Framework [Status] In Progress [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] In Progress labels Nov 2, 2017
@samouri samouri requested review from ockham, gziolo, blowery and ehg November 2, 2017 19:42
@ockham ockham force-pushed the upgrade/jest-enzyme branch from 679601e to 6c99356 Compare November 3, 2017 10:51
@ockham
Copy link
Contributor

ockham commented Nov 3, 2017

Rebased, reshrunk.

Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CircleCI looks good. Code changes introduced in last 3 commits look good.

Thanks for moving it to its own PR 👍

:shipit:

@samouri samouri merged commit e468e3c into master Nov 3, 2017
@samouri samouri deleted the upgrade/jest-enzyme branch November 3, 2017 15:53
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Nov 3, 2017
lamosty added a commit that referenced this pull request Nov 3, 2017
rclations pushed a commit to rclations/wp-calypso that referenced this pull request Nov 15, 2017
* add enzyme adapter

* Upgrade Enzyme

* update snapshots

* fix all test for enzyme3 + react16 compat

* Tests: Update react-pass-to-children to avoid spaces around children

* Tests: Improve enzyme lazy loading before tests are triggered

* Tests: Add snapshot serializer for enzyme wrapper

* use adapter for r15

* shrinkwrap

* 16-->15 fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants