lit-element-starter-ts icon indicating copy to clipboard operation
lit-element-starter-ts copied to clipboard

fix: include imports so tests run independently

Open colbywhite opened this issue 4 years ago • 0 comments
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

colbywhite avatar May 23 '21 20:05 colbywhite