mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
fb58494283
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/45196 Currently, `mockComponent` makes a false assumption that if a component is a function, it extends `React.Component`. There's a bunch of problems with this mocking setup with requiring mock components that extend `React.Component`, but this change does not attemp to solve that. This change unblocks future refactors to make native components export functional components (that are neither class component nor `forwardRef` results). Changelog: [General][Changed] - Fixed native component mocking in Jest unit tests to support functional components Reviewed By: javache Differential Revision: D59097730 fbshipit-source-id: ca2784ac3baa9ab4ab6a503c5fd6437c60179352