In this blog post, we'll use vitest, @testing-library/svelte, and svelte-htm to test Svelte components that seemed to be hard to test. Such as two-way bindings, name slots, Context API, ...etc. As a Svelte advocate, the fantastic DX is one of the rea...

Markdown supported · ⌘↵ to post
Amazing resource David. Congragulations and thank you.
Question: is it possible to locate your tests in a different directory, but which mirrors you actual src directory? In your source code they are all co-located, but I would ideally like to have these tests in a completely different folder.
Thanks
Eugene Tham
Well written article! Considering how new Svelte is, I had trouble finding tutorials online