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

[enzyme-adapter-react-16] [fix] Find memo components by constructor #2081

Merged
merged 1 commit into from
Apr 3, 2019

Conversation

eps1lon
Copy link
Contributor

@eps1lon eps1lon commented Apr 3, 2019

Follow up on 4149a21 which attempted to fix #2038. The fix was not working for the scenario described in #2038 (comment).

This PR adds a test for the scenario above and fixes that issue.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Thanks, this is excellent and much appreciated.

@ljharb ljharb merged commit 3045286 into enzymejs:master Apr 3, 2019
@eps1lon eps1lon deleted the test/memo-find branch April 3, 2019 22:02
ljharb added a commit that referenced this pull request Apr 6, 2019
 - [new] Add support for wrapping `Profiler` (#2055)
 - [new] support shallow rendering `createContext()` providers and consumers  - add `isContextConsumer`, `getProviderFromConsumer` (#1966)
 - [new] add `wrapWithWrappingComponent`, `isCustomComponent` (#1960)
 - [new] add `getDerivedStateFromError` support (#2036)
 - [fix] avoid invariant violation in provider (#2083)
 - [fix] properly fix finding memo(SFC) components (#2081)
 - [fix] properly render memoized SFCs
 - [fix] `shallow`: avoid wrapping component for hooks
 - [deps] update `react-is`
 - [dev deps] update `eslint`
 - [refactor] use `react-is` predicates more
 - [build] include source maps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot find a function component wrapped with React.memo HOC
2 participants