Skip to content

Commit 19b65b8

Browse files
committed
Lint fixes
1 parent 754ac0b commit 19b65b8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/navigation/isActiveRouteTests.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ 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 Record<string, unknown>;
8+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
9+
const actual = jest.requireActual('@react-navigation/native') as {getPathFromState: typeof GetPathFromState};
910
return {
1011
...actual,
1112
getPathFromState: jest.fn<typeof GetPathFromState>(() => '/settings/profile?backTo=settings'),
@@ -20,6 +21,7 @@ describe('Navigation', () => {
2021
beforeEach(() => {
2122
// Minimal stubs so getActiveRoute() can derive a path without rendering navigation containers.
2223
const ref = navigationRef as typeof navigationRef & {current: {getCurrentRoute: () => {name: string}} | null};
24+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2325
ref.current = {getCurrentRoute: jest.fn().mockReturnValue({name: 'test'})} as any;
2426
jest.spyOn(navigationRef, 'getRootState').mockReturnValue({} as unknown as ReturnType<typeof navigationRef.getRootState>);
2527
jest.spyOn(navigationRef, 'isReady').mockReturnValue(true);

0 commit comments

Comments
 (0)