Skip to content

Commit 4c8fa4a

Browse files
committed
Typecheck fixes
1 parent 8384aed commit 4c8fa4a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/navigation/isActiveRouteTests.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import {afterEach, beforeEach, describe, expect, it, jest} from '@jest/globals';
22
import type {Route} from '@src/ROUTES';
33
import Navigation from '@libs/Navigation/Navigation';
44
import navigationRef from '@libs/Navigation/navigationRef';
5-
import type * as ReactNavigationNative from '@react-navigation/native';
5+
import type {getPathFromState as GetPathFromState} from '@react-navigation/native';
66

77
jest.mock('@react-navigation/native', () => {
8-
const actual = jest.requireActual<ReactNavigationNative>('@react-navigation/native');
8+
const actual = jest.requireActual('@react-navigation/native') as {getPathFromState: typeof GetPathFromState};
99
return {
1010
...actual,
11-
getPathFromState: jest.fn<ReturnType<typeof actual.getPathFromState>, Parameters<typeof actual.getPathFromState>>(() => '/settings/profile?backTo=settings'),
11+
getPathFromState: jest.fn<typeof GetPathFromState>(() => '/settings/profile?backTo=settings'),
1212
};
1313
});
1414

0 commit comments

Comments
 (0)