Skip to content

Commit

Permalink
fix broken tests for shoelace-element (shoelace-style#1516)
Browse files Browse the repository at this point in the history
* add stub code prior to test

* fix broken test

* prettier

* prettier

* prettier
  • Loading branch information
KonnorRogers authored Aug 14, 2023
1 parent c743561 commit e298f7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/internal/shoelace-element.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: ` +
Expand Down

0 comments on commit e298f7e

Please sign in to comment.