We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1ba719 commit 55c1c2cCopy full SHA for 55c1c2c
jest.setup.ts
@@ -2,6 +2,15 @@ import * as ReactNative from 'react-native';
2
import { jest } from '@jest/globals';
3
4
jest.doMock('react-native', () => {
5
+ // @ts-ignore - react-native empty bridge config so native modules at least default init
6
+ global.__fbBatchedBridgeConfig = {};
7
+
8
+ // @ts-ignore - react-native new architecture interop flag to true
9
+ global.RN$TurboInterop = true;
10
11
+ // make sure PlatformConstants is visible otherwise turbo modules default init fails
12
+ ReactNative.NativeModules['PlatformConstants'] = {};
13
14
return Object.setPrototypeOf(
15
{
16
Platform: {
0 commit comments