Skip to content
This repository has been archived by the owner on Jul 8, 2021. It is now read-only.

Upgrade to Enzyme 3 and React 16 #2

Merged
merged 3 commits into from
Nov 18, 2017
Merged

Conversation

viebel
Copy link
Contributor

@viebel viebel commented Nov 17, 2017

On Enzyme 3, we need to call an configure function with an adapter. See https://github.com/airbnb/enzyme/blob/master/docs/guides/migration-from-2-to-3.md

The adapter depends on the react version you want to use.

In this pull request, we expose Enzyme.configureEnzyme().

For instance, for an app that uses bs-enzyme one has to:

  1. Include "enzyme-adapter-react-16" as a dependency
  2. Enzyme.configureEnzyme(Enzyme.react_16_adapter())

Let me know if you have better ideas about how to expose the new Enzyme configure function.

@rhysforyou
Copy link
Owner

Thanks for doing this! I've been feeling guilty about not having the time to work on this package. One thing that might be worth considering is exposing enzyme-adapter-react-15, enzyme-adapter-react-14 and so on, but for now this is great.

@rhysforyou rhysforyou merged commit 8a036c2 into rhysforyou:master Nov 18, 2017
@rhysforyou
Copy link
Owner

Alright I've published this as 0.3.0-beta.1, I'll do a proper release once I've updated the docs and tested this more thoroughly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants