-
-
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
Enzyme doesn't render highest DOM node in render tree of SFC with memo() #2068
Comments
I'm a bit confused. enzyme does not support nor endorse snapshot testing, but What happens if you remove the |
Thanks for reply, Jordan! Ha, yeah! It's strange, but without |
Indeed, it's likely a bug with memo support. Thanks for confirming. |
- [new] support `suspenseFallback` option; support `Suspense`/`Lazy` (#1975) - [fix] `shallow`: properly dive through `memo` components (#2103, #2068) - [fix] avoid a Context.Provider deprecation warning - [fix] shallow renderer for `memo` does not respect `defaultProps` (#2115) - [fix] Don’t show wrapped component displayName in lazy component (#1975) - [fix] `simulateEvent`: call the adapter’s implementation, not the raw one (#2100) - [deps] update `enzyme-adapter-utils` - [dev deps] update `eslint-plugin-react`, `eslint-plugin-import`
Current behavior
Enzyme returns the DOM tree from render without the highest node in it (functional component). So, I faced this issue once move to React 16.8 and update the all required enzyme/jest dependencies.
The interesting thing - if we add some extra nodes on top of the render tree - it shows previously hidden top node without any problems...
Current
.debug()
info:Expected behavior
Should return full rendered tree including the highest node in it.
It must be:
Your environment
Current Component in render:
Current test environment:
API
Version
Adapter
The text was updated successfully, but these errors were encountered: