Skip to content

Commit

Permalink
feat: updated test for undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
asmuthuk authored and Ashwin7mak committed Aug 8, 2024
1 parent 24554e9 commit f308125
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/components/Menu/Menu.unit.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ describe('<Menu />', () => {
expect(element.getAttribute('role')).toBe('menu');
});

it('should have role of menu when isGroupRole is undefined', () => {
expect.assertions(1);

const element = mount(<Menu {...defaultProps} isGroupRole={undefined} />)
.find(Menu)
.getDOMNode();

expect(element.getAttribute('role')).toBe('menu');
});

it('should have provided style when style is provided', () => {
expect.assertions(1);

Expand Down

0 comments on commit f308125

Please sign in to comment.