File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import navigationRef from '@libs/Navigation/navigationRef';
55import type { getPathFromState as GetPathFromState } from '@react-navigation/native' ;
66
77jest . 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 } ) ;
You can’t perform that action at this time.
0 commit comments