Skip to content

jest-wrap is breaking Enzyme post React 16.4 #21

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

Open
culshaw opened this issue May 17, 2019 · 1 comment
Open

jest-wrap is breaking Enzyme post React 16.4 #21

culshaw opened this issue May 17, 2019 · 1 comment

Comments

@culshaw
Copy link

culshaw commented May 17, 2019

Hello, me again.

I have done some investigation this morning around how our tests started failing after updating from React 16.4 to 16.6 (then 16.8) but have found that the cause is jest-wrap when you use mount from Enzyme.

Here's a sample repository highlighting what we're experiencing.
https://github.com/culshaw/jest-wrap-react-16.8

There are two test files, one with no wrapping which contain identical tests as tests that are wrapped, mocking an object called YJ and the other mocking the entire window and YJ.

Hope it helps!

@ljharb
Copy link
Collaborator

ljharb commented May 25, 2019

Thanks for the report - I'll try to take a look soon.

I'm confused how react 16.4 would work, but 16.5 (presumably) would fail - with enzyme, the code wouldn't change, except to enable a few new features.

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

No branches or pull requests

2 participants