-
-
Notifications
You must be signed in to change notification settings - Fork 72
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 compatible with enzyme v3 #196
Make compatible with enzyme v3 #196
Conversation
const root = getRoot(wrapper) | ||
const instance = root.instance() | ||
const fn = instance && instance.constructor | ||
const name = fn ? fn.displayName || fn.name : root.name(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sadly i think this line needs to have its semicolon removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ljharb when will the PR be merged so we can get this resolved?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When tests pass.
@jugglinmike, any idea on these cheerio test failures and how to fix them? |
@lelandrichardson Any chance you could kill that semi colon to get this merged? 😄 |
@cameronroe i'd be happy to, but that's not what's limiting this PR. All of the cheerio tests are failing. |
@lelandrichardson Which build are you looking at? https://travis-ci.org/producthunt/chai-enzyme/jobs/276724493#L984 |
Closing in favour of #198 which is in a near finished state. Thanks for your contribution @lelandrichardson |
to: @ayrton
This PR updates chai-enzyme to be compatible with the soon-to-be-released Enzyme 3.0. There were a couple of things being used in chai-enzyme that were "private" from enzyme, but you can use public APIs to achieve the same result. Most everything else should not break any of chai-enzyme's functionality.
The one caveat is that enzyme v3 pulls in the new 1.x version of cheerio, which appears to break a handful of the render tests in this repo. I don't have a ton of context around 1) what changed in cheerio from 0.x => 1.x and 2) how chai and this repo really work, so I was really struggling on getting these tests to pass. I was hoping I could get a bit of guidance here.