Skip to content

Commit 211c7fa

Browse files
committed
fix: unit test
1 parent c054cab commit 211c7fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/components/Views/Login/index.test.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const mockNavigate = jest.fn();
2727
const mockReplace = jest.fn();
2828
const mockGoBack = jest.fn();
2929
const mockRoute = jest.fn();
30+
const mockReset = jest.fn();
3031

3132
jest.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,

0 commit comments

Comments
 (0)