lit-element-starter-ts
lit-element-starter-ts copied to clipboard
fix: include imports so tests run independently
trafficstars
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