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 compatible with enzyme v3 #196

Conversation

lelandrichardson
Copy link

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.

const root = getRoot(wrapper)
const instance = root.instance()
const fn = instance && instance.constructor
const name = fn ? fn.displayName || fn.name : root.name();
Copy link
Member

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

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?

Copy link
Member

Choose a reason for hiding this comment

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

When tests pass.

@ljharb
Copy link
Member

ljharb commented Sep 26, 2017

@jugglinmike, any idea on these cheerio test failures and how to fix them?

@ninjasort
Copy link

@lelandrichardson Any chance you could kill that semi colon to get this merged? 😄

@lelandrichardson
Copy link
Author

@cameronroe i'd be happy to, but that's not what's limiting this PR. All of the cheerio tests are failing.

@ninjasort
Copy link

@ayrton
Copy link
Contributor

ayrton commented Oct 2, 2017

Closing in favour of #198 which is in a near finished state. Thanks for your contribution @lelandrichardson

@ayrton ayrton closed this Oct 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants