From 600dee0547423e3a9e1cce2451aad5f95c5e28dd Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Thu, 26 Aug 2021 09:35:14 -0500 Subject: [PATCH] test(messaging, jest): add mock for RNFBMessagingModule::onMessage Courtesy of @JaioSkura on https://github.com/invertase/react-native-firebase/issues/4773#issuecomment-906458607 --- jest.setup.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jest.setup.ts b/jest.setup.ts index a1e17e4007..d0d178ea83 100644 --- a/jest.setup.ts +++ b/jest.setup.ts @@ -49,6 +49,9 @@ jest.doMock('react-native', () => { settings: jest.fn(), documentSet: jest.fn(), }, + RNFBMessagingModule: { + onMessage: jest.fn(), + }, RNFBPerfModule: {}, RNFBStorageModule: { useEmulator: jest.fn(),