-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Support for React 17 #2429
Comments
A CodeSandbox is ready: https://codesandbox.io/s/cranky-euclid-4qr9z |
I would never expect enzyme to "just work" with a new major version of React out of the box :-) React breaks things in minors often enough as it is. First, I have to create an adapter for React 17, and then we'll be able to look at the test failures and go from there. |
Thanks, but that isn't going to speed anything up. enzyme won't be guaranteed to work on React 17 until it's fully released, not a preview. |
I think no one expects everything to work right from the start, but it would be nice to just have the adapter preview so we can find bugs early :) |
That is certainly my hope and plan, just not something i can commit to, since the react team hasn’t coordinated with me prior to releases in years. |
It’s fair we haven’t reached out before this particular RC since we generally view an RC as a “reachout” to the whole community. But I believe I did file #2358 (16.14 compatibility). Our plans for 16.14 changed and that release turned into 17 but I’d expect the naming change described in that issue to be the primary one you’d need to address. (Although I could totally be missing something!) Sorry for the frustration. |
@gaearon fair point that there's been nonzero efforts, primarily from you personally, which I appreciate. Thanks for pointing me to that issue; I'll incorporate that into the update. |
For those impatient ones (myself included), I published Use it like any other adapter, so: import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
enzyme.configure({ adapter: new Adapter() }); I tested it on a semi large repository (2000 tests) with no failures, so it should be good enough to use, if the only thing blocking you was a broken adapter.
Enjoy! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
react 17 has been released. |
Indeed it has, thanks. I'm still working on getting the adapter set up and passing tests. |
Watch enzymejs/enzyme#2429 for an official adapter.
An RC for React 17 was released: https://reactjs.org/blog/2020/08/10/react-v17-rc.html
And it does not work with React 17, oops:
Working on an isolated repro ✍️
The text was updated successfully, but these errors were encountered: