From e298f7e5f4478b6f47ad5d65a5184605515d1600 Mon Sep 17 00:00:00 2001 From: Konnor Rogers Date: Mon, 14 Aug 2023 11:23:00 -0400 Subject: [PATCH] fix broken tests for shoelace-element (#1516) * add stub code prior to test * fix broken test * prettier * prettier * prettier --- src/internal/shoelace-element.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/internal/shoelace-element.test.ts b/src/internal/shoelace-element.test.ts index 21fbf6cd3..d41f333c5 100644 --- a/src/internal/shoelace-element.test.ts +++ b/src/internal/shoelace-element.test.ts @@ -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: ` +