Files
react-native-firebase/jest.setup.ts
Darren Ackers e0082abd64 tests: jest testing migration crashlytics (#3588)
* tests(crashlytics): migrate JS only tests to Jest

* Converted crashlytics tests to ts
2020-05-05 22:38:29 +01:00

35 lines
700 B
TypeScript

import * as ReactNative from 'react-native';
jest.doMock('react-native', () => {
return Object.setPrototypeOf(
{
Platform: {
OS: 'android',
},
NativeModules: {
...ReactNative.NativeModules,
RNFBAppModule: {
NATIVE_FIREBASE_APPS: [
{
appConfig: {
name: '[DEFAULT]',
},
options: {},
},
{
appConfig: {
name: 'secondaryFromNative',
},
options: {},
},
],
},
RNFBPerfModule: {},
RNFBCrashlyticsModule: {},
},
},
ReactNative,
);
});