Make enzyme work for react ^15.4.x. #896
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Users with package.json files that include:
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 link
ing 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.