Skip to content

Commit 754ac0b

Browse files
committed
Fixes
1 parent 4c8fa4a commit 754ac0b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/navigation/isActiveRouteTests.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import navigationRef from '@libs/Navigation/navigationRef';
55
import type {getPathFromState as GetPathFromState} from '@react-navigation/native';
66

77
jest.mock('@react-navigation/native', () => {
8-
const actual = jest.requireActual('@react-navigation/native') as {getPathFromState: typeof GetPathFromState};
8+
const actual = jest.requireActual('@react-navigation/native') as Record<string, unknown>;
99
return {
1010
...actual,
1111
getPathFromState: jest.fn<typeof GetPathFromState>(() => '/settings/profile?backTo=settings'),
@@ -20,7 +20,7 @@ describe('Navigation', () => {
2020
beforeEach(() => {
2121
// Minimal stubs so getActiveRoute() can derive a path without rendering navigation containers.
2222
const ref = navigationRef as typeof navigationRef & {current: {getCurrentRoute: () => {name: string}} | null};
23-
ref.current = {getCurrentRoute: jest.fn().mockReturnValue({name: 'test'})};
23+
ref.current = {getCurrentRoute: jest.fn().mockReturnValue({name: 'test'})} as any;
2424
jest.spyOn(navigationRef, 'getRootState').mockReturnValue({} as unknown as ReturnType<typeof navigationRef.getRootState>);
2525
jest.spyOn(navigationRef, 'isReady').mockReturnValue(true);
2626
});

0 commit comments

Comments
 (0)