Skip to content

Commit

Permalink
Merge pull request Expensify#35469 from callstack-internal/fix/change…
Browse files Browse the repository at this point in the history
…-mock-in-perf-tests-for-SignInPage

[NoQA] Change navigation mock in perf tests for SignInPage
  • Loading branch information
mountiny authored Feb 1, 2024
2 parents eab0086 + dd95e9b commit aeb8638
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions tests/perf-test/SignInPage.perf-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,6 @@ import * as TestHelper from '../utils/TestHelper';
import waitForBatchedUpdates from '../utils/waitForBatchedUpdates';
import wrapOnyxWithWaitForBatchedUpdates from '../utils/wrapOnyxWithWaitForBatchedUpdates';

jest.mock('../../src/libs/Navigation/Navigation', () => {
const actualNav = jest.requireActual('../../src/libs/Navigation/Navigation');
return {
...actualNav,
navigationRef: {
addListener: () => jest.fn(),
removeListener: () => jest.fn(),
},
} as typeof Navigation;
});

const mockedNavigate = jest.fn();
jest.mock('@react-navigation/native', () => {
const actualNav = jest.requireActual('@react-navigation/native');
Expand All @@ -43,7 +32,10 @@ jest.mock('@react-navigation/native', () => {
navigate: jest.fn(),
addListener: () => jest.fn(),
}),
createNavigationContainerRef: jest.fn(),
createNavigationContainerRef: () => ({
addListener: () => jest.fn(),
removeListener: () => jest.fn(),
}),
} as typeof NativeNavigation;
});

Expand Down

0 comments on commit aeb8638

Please sign in to comment.