mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 12:09:26 +00:00
ts fixes
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { expect, fixture, html, waitUntil } from '@open-wc/testing';
|
||||
import type SlIconButton from './icon-button';
|
||||
|
||||
type LinkTarget = '_self' | '_blank' | '_parent' | '_top';
|
||||
|
||||
describe('<sl-icon-button>', () => {
|
||||
describe('defaults ', () => {
|
||||
it('default properties', async () => {
|
||||
@@ -62,7 +64,7 @@ describe('<sl-icon-button>', () => {
|
||||
});
|
||||
|
||||
describe('and target is present', () => {
|
||||
['_blank', '_parent', '_self', '_top'].forEach((target: string) => {
|
||||
['_blank', '_parent', '_self', '_top'].forEach((target: LinkTarget) => {
|
||||
it(`the anchor target is the provided target: ${target}`, async () => {
|
||||
const el = await fixture<SlIconButton>(
|
||||
html` <sl-icon-button href="some/path" target="${target}"></sl-icon-button> `
|
||||
@@ -80,7 +82,7 @@ describe('<sl-icon-button>', () => {
|
||||
});
|
||||
|
||||
describe('and download is present', () => {
|
||||
it(`the anchor downlown attribute is the provided download`, async () => {
|
||||
it(`the anchor download attribute is the provided download`, async () => {
|
||||
const fakeDownload = 'some/path';
|
||||
const el = await fixture<SlIconButton>(
|
||||
html` <sl-icon-button href="some/path" download="${fakeDownload}"></sl-icon-button> `
|
||||
|
||||
@@ -28,7 +28,7 @@ export function getIconLibrary(name?: string) {
|
||||
export function registerIconLibrary(
|
||||
name: string,
|
||||
options: { resolver: IconLibraryResolver; mutator?: IconLibraryMutator }
|
||||
): void {
|
||||
) {
|
||||
unregisterIconLibrary(name);
|
||||
registry.push({
|
||||
name,
|
||||
|
||||
Reference in New Issue
Block a user