Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix broken tests for shoelace-element #1516

Merged
merged 5 commits into from
Aug 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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