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: include imports so tests run independently #49

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

colbywhite
Copy link
Contributor

if you were to comment out the test that uses instanceof, the rest of
the tests would fail due to the import being tree shaken by typescript.
without the import, the code that puts MyElement into customElements
won't ever get ran.

this import ensures that the import stays no matter what kind of test
you write, thus ensuring that the customElements piece is ran.

credit to @Westbrook for coming up with the solution

if you were to comment out the test that uses `instanceof`, the rest of
the tests would fail due to the import being tree shaken by typescript.
without the import, the code that puts MyElement into `customElements`
won't ever get ran.

this import ensures that the import stays no matter what kind of test
you write, thus ensuring that the `customElements` piece is ran.

credit to @Westbrook for coming up with the solution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant