react-native-macos/jest
Tim Yung f638aff434 RN: Add `NativeComponentRegistry.getWithFallback_DEPRECATED`
Summary:
Creates `NativeComponentRegistry.getWithFallback_DEPRECATED`. This is deprecated from inception because it exists only to support a pattern that should not be necessary.

For any given `NativeX` component, the JavaScript module that calls `NativeComponentRegistry.get('NativeX', …)` should only exist in the JavaScript bundle if the native binary actually supports that native component.

But in today's transitional state of the world, there are JavaScript modules that use `UIManager.getViewManagerConfig('NativeX')` as a means of feature detection.

The purpose of `NativeComponentRegistry.getWithFallback_DEPRECATED` is to bridge this transitional gap. Component should migrate toward initializing the `NativeComponentRegistry` with a runtime configuration provider that enumerates all supported native components. If the native component is not supported, it should return null.

Changelog:
[Internal]

Reviewed By: fkgozali

Differential Revision: D25109988

fbshipit-source-id: 76f7077904594ca63495d8338905c43712ea02e0
2020-11-20 18:53:14 -08:00
..
MockNativeMethods.js change jest native method mocks to jest functions (#24337) 2019-04-07 11:54:48 -07:00
assetFileTransformer.js Remove `fbjs-scripts` in favor of `@jest/create-cache-key-function` 2020-10-06 18:22:58 -07:00
mockComponent.js Correctly mock all components by setting the displayName 2020-07-28 13:09:06 -07:00
mockNativeComponent.js RN: Create `NativeComponentRegistry` 2020-11-19 10:55:50 -08:00
mockScrollView.js Make ScrollView use ForwardRef 2020-03-26 16:53:46 -07:00
preprocessor.js Remove `fbjs-scripts` in favor of `@jest/create-cache-key-function` 2020-10-06 18:22:58 -07:00
renderer.js Switch to react-shallow-renderer 2020-07-10 14:06:38 -07:00
setup.js RN: Add `NativeComponentRegistry.getWithFallback_DEPRECATED` 2020-11-20 18:53:14 -08:00