import { newSpecPage } from "@stencil/core/testing";
import { Icon } from "../icon";
describe('icon', () => {
it('renders', async () => {
const { root } = await newSpecPage({
components: [Icon],
html: '',
});
expect(root).toEqualHtml(`
`);
});
it('renders rtl with aria-hidden', async () => {
const { root } = await newSpecPage({
components: [Icon],
direction: 'rtl',
html: ``,
});
expect(root).toEqualHtml(`
`);
});
it('renders custom aria-label', async () => {
const { root } = await newSpecPage({
components: [Icon],
html: ``,
});
expect(root).toEqualHtml(`
`);
});
it('renders custom label after changing source', async () => {
const page = await newSpecPage({
components: [Icon],
html: ``,
});
const icon = page.root;
expect(icon).toEqualHtml(`
`);
if (icon) {
icon.name = 'trash';
}
await page.waitForChanges();
expect(icon).toEqualHtml(`
`);
});
});