File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
app/components/Views/Login Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ const mockNavigate = jest.fn();
2727const mockReplace = jest . fn ( ) ;
2828const mockGoBack = jest . fn ( ) ;
2929const mockRoute = jest . fn ( ) ;
30+ const mockReset = jest . fn ( ) ;
3031
3132jest . mock ( '@react-navigation/native' , ( ) => {
3233 const actualNav = jest . requireActual ( '@react-navigation/native' ) ;
@@ -35,6 +36,7 @@ jest.mock('@react-navigation/native', () => {
3536 useNavigation : ( ) => ( {
3637 navigate : mockNavigate ,
3738 replace : mockReplace ,
39+ reset : mockReset ,
3840 goBack : mockGoBack ,
3941 } ) ,
4042 useRoute : ( ) => mockRoute ( ) ,
@@ -586,7 +588,7 @@ describe('Login', () => {
586588 } ) ;
587589
588590 expect ( Authentication . appTriggeredAuth ) . toHaveBeenCalled ( ) ;
589- expect ( mockReplace ) . toHaveBeenCalledWith ( Routes . ONBOARDING . ROOT_NAV , {
591+ expect ( mockReset ) . toHaveBeenCalledWith ( Routes . ONBOARDING . ROOT_NAV , {
590592 screen : Routes . ONBOARDING . NAV ,
591593 params : {
592594 screen : Routes . ONBOARDING . OPTIN_METRICS ,
You can’t perform that action at this time.
0 commit comments