diff --git a/test/utils/DropdownBtn.test.tsx b/test/utils/DropdownBtn.test.tsx index 2076f6ec..a8ee2012 100644 --- a/test/utils/DropdownBtn.test.tsx +++ b/test/utils/DropdownBtn.test.tsx @@ -38,4 +38,15 @@ describe('', () => { expect(toggle.prop('className')?.trim()).toEqual(expectedClasses); }); + + it.each([ + [ 100, { minWidth: '100px' }], + [ 250, { minWidth: '250px' }], + [ undefined, {}], + ])('renders proper styles when minWidth is provided', (minWidth, expectedStyle) => { + const wrapper = createWrapper({ text: '', minWidth }); + const style = wrapper.find(DropdownMenu).prop('style'); + + expect(style).toEqual(expectedStyle); + }); });