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

Make enzyme work for react ^15.4.x. #896

Merged
merged 1 commit into from
Apr 14, 2017
Merged

Make enzyme work for react ^15.4.x. #896

merged 1 commit into from
Apr 14, 2017

Conversation

jwalton
Copy link
Contributor

@jwalton jwalton commented Apr 13, 2017

Users with package.json files that include:

    "react": "^15.4.0",
    "react-dom": "^15.4.0",
    "enzyme": "^2.8.0",

will have their tests break after #876. This PR fixes it so enzyme "does the right thing" in the case where the user is running react 15.4, running react 15.5 but hasn't done any of the "upgrade work" yet, and in the case where they are actually running 15.5.

Verified by running this test script. If you want to run this, you need a folder called ~/Development/enzyme which has a built copy of this branch, and you need to run it in some other directory. (Need the built copy instead of just npm linking because we need to pick up the right versions from the test project.) The output of this script on my machine is here.

Closes #892.

@jwalton
Copy link
Contributor Author

jwalton commented Apr 13, 2017

I'm going to update my test script to try 0.14.8 as well...

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Thanks, I'm convinced that this is the right change.

@ljharb ljharb merged commit 817a76d into enzymejs:master Apr 14, 2017
@jwalton
Copy link
Contributor Author

jwalton commented Apr 14, 2017 via email

@ljharb
Copy link
Member

ljharb commented Apr 14, 2017

Thank you!

@fillippeyton
Copy link

Awesome!

@ljharb
Copy link
Member

ljharb commented Apr 14, 2017

v2.8.2 published.

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.

2.8.1 fails with "Cannot find module 'react-test-renderer/shallow'"
3 participants