crisward / svelte-tag

MIT License
52 stars 8 forks source link

Moving to Vitest with help of jsdom #14

Closed patricknelson closed 1 year ago

patricknelson commented 1 year ago

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:

image

patricknelson commented 1 year ago

p.s. If you merge this first, I'll update my PR #13

crisward commented 1 year ago

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.

patricknelson commented 1 year ago

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.