Skip to content

Commit

Permalink
fix: jest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillzyusko committed Nov 25, 2024
1 parent 6128e01 commit f95db58
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion __mocks__/react-native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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/';
Expand Down Expand Up @@ -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;
Expand All @@ -50,6 +53,9 @@ jest.doMock('react-native', () => {
navigationBarHeight: 0,
},
StartupTimer: {stop: jest.fn()},
RNNavBarManager: {
setButtonStyle: jest.fn(),
},
},
Linking: {
...ReactNative.Linking,
Expand Down

0 comments on commit f95db58

Please sign in to comment.