Skip to content
This repository has been archived by the owner on Dec 21, 2021. It is now read-only.

Commit

Permalink
add extra NavigationMobile test
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan committed Jun 5, 2019
1 parent e28657d commit 20b5883
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/__tests__/navigation_mobile.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ describe('The NavigationMobile component', () => {
expect(props.onCloseMobileMenuHandler).toBeCalled();
});

it('should not call close handler if it is not passed', () => {
wrapper.setProps({
onCloseMobileMenuHandler: undefined,
});
wrapper.find(NavLink).first().props().onClick();
expect(props.onCloseMobileMenuHandler).not.toBeCalled();
});

it('should render sign out button', () => {
const onSignOutClickHandler = jest.fn();
wrapper.setProps({
Expand Down

0 comments on commit 20b5883

Please sign in to comment.