-
-
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
forwardRef: Enzyme Internal Error: unknown node with tag 14 #1604
Comments
This might be solved by #1592 |
My workaround is this:
|
You could add a patch as specified in this issue #1513 |
Best way to fix this currently: |
Cannot be merged yet, since enzyme@3.3.0 currently breaks on a React.forwardRef with an 'Enzyme Internal Error: unknown node with tag 14' (see issue enzymejs/enzyme#1604).
@KevinGrandon I'm trying your package but I still get the same error, are you sure it ships the patch needed for the forwardRef feature? I don't see the node listed in the allowed nodes list: |
@KevinGrandon Looks like your package doesn't include a fix for ForwardRef |
There's no need for a separate package; everything in this repo is now published. #1592 will fix it once merged and released. |
@ljharb With |
It’s not released yet, i just merged it an hour ago. |
@ljharb Ok. Thanks ) |
@ljharb so 3.4.2 should solve this problem? I'm using 3.4.2 and I still got the same error. |
No, it should not. This is a new feature, so it would be included in v3.5.0. |
@ljharb any prevision to v3.50 release? |
Like every release, after it’s ready, and when time permits. It hasn’t even been a full day yet. I do sleep, in case that isn’t apparent. |
@ljharb i'm not blaming you... you dont need to be defensive. it is just a question :( i dont know the codebase, but is there anything I can do to help? |
Looks like the new version v3.5.0 is released! And that suddenly made my life easier! Last Friday night I had checked it and it wasn't released, and today Monday morning surprise that its released. Thanks a lot @ljharb |
Current behavior
After update
React
to 16.3.0 version and useforwardRef
, my tests is broken.Component that uses
forwardRef
now exports as:and test is:
throw error is:
Invariant Violation: ReactShallowRenderer render(): Shallow rendering works only with custom components, but the provided element type was 'object'.
But if I use
render
method this error doesn't happened.When I use
mount
method with test is:I catch error is:
Enzyme Internal Error: unknown node with tag 14
Expected behavior
Your environment
API
Version
Adapter
The text was updated successfully, but these errors were encountered: