diff --git a/src/components/TabMenu/Item/Item.tsx b/src/components/TabMenu/Item/Item.tsx index 16088bbd..833c9557 100644 --- a/src/components/TabMenu/Item/Item.tsx +++ b/src/components/TabMenu/Item/Item.tsx @@ -26,7 +26,7 @@ const Item: React.FC = ({ [styles.active]: active || isChildActive(children), }); return ( -
  • +
  • {children}
  • ); diff --git a/src/components/TabMenu/TabMenu.test.tsx b/src/components/TabMenu/TabMenu.test.tsx index 145c4bc8..f8dfa0c7 100644 --- a/src/components/TabMenu/TabMenu.test.tsx +++ b/src/components/TabMenu/TabMenu.test.tsx @@ -27,6 +27,18 @@ describe('TabMenu.Item', () => { expect(inactive.prop('active')).not.toBe(true); }); + + it('triggers onClick handler when clicking', () => { + const fakeClickHandler = jest.fn(); + const menuItem = mount( + + Clickable menu item + + ); + menuItem.simulate('click'); + + expect(fakeClickHandler).toHaveBeenCalled(); + }); }); describe('EasyTabMenu', () => {