-
-
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
Fix node resolving in React 16 adapter #1169
Fix node resolving in React 16 adapter #1169
Conversation
@lelandrichardson It is probably not the cleaner way to do it but it fixes a huge bug. I think merging it and publishing a patch would be great! |
Do you have a plan for what we need to expose on React side to remove this hack? |
I was running into a an issue similar to #1153 so I followed @gaearon's advice and tried this patch out. It seemed to do the trick for me 👍 I had to sprinkle Here is what I did to test this locally:
I ran into an oddity where enzyme was throwing the following error:
I assumed it was something weird related to how I built this package and so I just commented out the relevant lines in |
@gaearon ideally React would expose a way to call |
@neoziro thanks for hitting this! I think this is good and am going to merge. It puts us in a strictly better state than where we are now. That said, I'm definitely interested in hashing out more details with @aweary and @gaearon around getting the react 16 adapter to a state where it doesn't depend on any internals. I agree with Brandon that this likely doesn't need to be much more than just exposing a Perhaps this wednesday (at react wednesday) could be a good time to hash out some of these details. In the mean time, I'm going to merge this to get some people unblocked. Oh, also, @marvinpinto the error you got is indicative of multiple copies of |
@lelandrichardson you are welcome! It was a pleasure to help! |
I added a test relative to #1163 (comment)
I tried to fix it but I couldn't figure out when to use alternate node.