Skip to content

Commit 2fd1ac3

Browse files
committed
feat: add test for removing name prop
1 parent e404545 commit 2fd1ac3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/FormsyDropdown.spec.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@ describe('<Dropdown/>', () => {
5555
expect(wrapper.container.querySelector('.ui.dropdown')).toBeInTheDocument();
5656
});
5757

58-
it('should not pass label prop to Semantic Dropdown', () => {
59-
expect(wrapper.getByRole('listbox')).not.toHaveAttribute('label');
58+
['label', 'name'].forEach((prop) => {
59+
it(`should not pass label ${prop} to Semantic Dropdown`, () => {
60+
expect(wrapper.getByRole('listbox')).not.toHaveAttribute(prop);
61+
});
6062
});
6163

6264
describe('When value is invalid', () => {

0 commit comments

Comments
 (0)