Skip to content

Commit 6c335b1

Browse files
committed
test svg is there
1 parent 8b3769c commit 6c335b1

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

packages/uui-icon/lib/uui-icon.test.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,20 @@ import { html, fixture, expect } from '@open-wc/testing';
22
import { UUIIconElement } from './uui-icon.element';
33
import '.';
44

5+
import { iconRegistry } from './UUIIconRegistry';
6+
57
describe('UUIIconElement', () => {
8+
const TEST_SVG =
9+
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"></svg>';
610
let element: UUIIconElement;
711

812
beforeEach(async () => {
9-
element = await fixture(html` <uui-icon></uui-icon> `);
13+
iconRegistry.defineIcon('test', TEST_SVG);
14+
element = await fixture(html` <uui-icon name="test"></uui-icon> `);
15+
});
16+
17+
it('contains svg of icon', async () => {
18+
await expect(element).shadowDom.to.equal(TEST_SVG);
1019
});
1120

1221
it('passes the a11y audit', async () => {

0 commit comments

Comments
 (0)