From f95db583b170077d2293b3806d862491ccfe9055 Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Mon, 25 Nov 2024 13:30:06 +0100 Subject: [PATCH] fix: jest tests --- __mocks__/react-native.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/__mocks__/react-native.ts b/__mocks__/react-native.ts index 4c2a86818e9b..47eb591d426e 100644 --- a/__mocks__/react-native.ts +++ b/__mocks__/react-native.ts @@ -2,7 +2,7 @@ import * as ReactNative from 'react-native'; import type StartupTimer from '@libs/StartupTimer/types'; -const {BootSplash} = ReactNative.NativeModules; +const {BootSplash, RNNavBarManager} = ReactNative.NativeModules; jest.doMock('react-native', () => { let url = 'https://new.expensify.com/'; @@ -31,6 +31,9 @@ jest.doMock('react-native', () => { navigationBarHeight: number; }; StartupTimer: StartupTimer; + RNNavBarManager: typeof ReactNative.NativeModules & { + setButtonStyle: typeof RNNavBarManager.setButtonStyle; + }; }; Linking: typeof ReactNative.Linking & { setInitialURL: (newUrl: string) => void; @@ -50,6 +53,9 @@ jest.doMock('react-native', () => { navigationBarHeight: 0, }, StartupTimer: {stop: jest.fn()}, + RNNavBarManager: { + setButtonStyle: jest.fn(), + }, }, Linking: { ...ReactNative.Linking,