fix broken tests for shoelace-element (#1516)

* add stub code prior to test

* fix broken test

* prettier

* prettier

* prettier
pull/1517/head
Konnor Rogers 2023-08-14 11:23:00 -04:00 zatwierdzone przez GitHub
rodzic c743561c25
commit e298f7e5f4
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -133,10 +133,10 @@ before(async () => {
relevantMetadata.forEach(({ tagName, path }) => {
it(`Should not register any components: ${tagName}`, async () => {
// Check if importing the files automatically registers any components
await import('../../dist/' + path);
const registeredTags = tagNames.filter(tag => Boolean(window.customElements.get(tag)));
// Need to make sure we remove the current tag from the tagNames and *then* see whats been registered.
const registeredTags = tagNames.filter(tag => tag !== tagName && Boolean(window.customElements.get(tag)));
const errorMessage =
`Expected ${path} to not register any tags, but it registered the following tags: ` +