Closed patricknelson closed 1 year ago
p.s. If you merge this first, I'll update my PR #13
I didn't realise JSDOM supported web components. I've had a quite a few client tests fail in the past due to unsupported api's so tend to go the browser route. However in this instance JSDOM / Vitest appear to work well.
Thanks for the work on this.
I was worried about that too. I just gave it a shot since the API was so similar. I’m really happy the transition was relatively easy and painless.
Since my PR #13 was already merged, I’ll have to resubmit a new PR that does the same thing but addresses the failing tests since of course the whole unit test abstraction was rewritten/recreated. This of course meant the unit tests from the other PR weren’t carried over and started failing (there would have been conflicts anyway with the introduction of the <!--<TestTag>-->
comments by the compiler).
More to come soon.
Since Snowpack is no longer active, moving to modern Vitest and fully JS based dom (
jsdom
) which is very fast and works very well across various environments.Change log:
TestTag
) and ensuring unit test file matches tag name. Should be useful if we add more tests later with different components..editorconfig
and.gitattributes
to enforce the repo's existing formatting style (i.e. 2 space indentation) and since I'm on Windows, combatting the committing ofcrlf
chars at the end of each line 🤦♂️.gitignore
to prevent committing of my IDE files (Jetbrains in my case).