Skip to content

Commit f9f2f00

Browse files
committed
fix: mock addListener in edit profile test
1 parent 17e2e6f commit f9f2f00

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/__tests__/profile/edit_profile.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jest.mock('@react-navigation/elements', () => ({
2323
}));
2424

2525
const mockSetOptions = jest.fn();
26-
2726
const mockGoBack = jest.fn();
27+
const mockAddListener = jest.fn();
2828

2929
jest.mock('@react-navigation/native', () => {
3030
const actual = jest.requireActual('@react-navigation/native');
@@ -34,6 +34,7 @@ jest.mock('@react-navigation/native', () => {
3434
navigate: jest.fn(),
3535
goBack: mockGoBack,
3636
setOptions: mockSetOptions,
37+
addListener: mockAddListener,
3738
}),
3839
};
3940
});

0 commit comments

Comments
 (0)