diff --git a/packages/dnb-ui-lib/src/components/icon/__tests__/Icon.test.js b/packages/dnb-ui-lib/src/components/icon/__tests__/Icon.test.js index 5166d63ae70..1da1b6fc368 100644 --- a/packages/dnb-ui-lib/src/components/icon/__tests__/Icon.test.js +++ b/packages/dnb-ui-lib/src/components/icon/__tests__/Icon.test.js @@ -39,6 +39,17 @@ describe('Icon component', () => { expect(elem.props().height).toBe(height) }) + it('should work with custom size', () => { + const Comp = mount() + expect( + Comp.find('span.dnb-icon').hasClass('dnb-icon--custom-size') + ).toBe(true) + Comp.setProps({ size: 16 }) + expect( + Comp.find('span.dnb-icon').hasClass('dnb-icon--custom-size') + ).toBe(false) + }) + it('should validate with ARIA rules', async () => { const Comp = mount() expect(await axeComponent(Comp)).toHaveNoViolations()