Skip to content
This repository was archived by the owner on Mar 6, 2025. It is now read-only.

Commit 20b5883

Browse files
author
Alan
committed
add extra NavigationMobile test
1 parent e28657d commit 20b5883

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/components/__tests__/navigation_mobile.test.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ describe('The NavigationMobile component', () => {
5959
expect(props.onCloseMobileMenuHandler).toBeCalled();
6060
});
6161

62+
it('should not call close handler if it is not passed', () => {
63+
wrapper.setProps({
64+
onCloseMobileMenuHandler: undefined,
65+
});
66+
wrapper.find(NavLink).first().props().onClick();
67+
expect(props.onCloseMobileMenuHandler).not.toBeCalled();
68+
});
69+
6270
it('should render sign out button', () => {
6371
const onSignOutClickHandler = jest.fn();
6472
wrapper.setProps({

0 commit comments

Comments
 (0)