Post

I've been racking my brains trying to get vitest to work with runes using Svelte5 / Sveltekit. I feel like there's so many variables at play. Is it because i'm on Svelte 5? Is it because I'm using Bun? Is it a Sveltekit thing? Has anyone else ran into this?

0 reposts2 likes

It's probably because you are in svelte 5..you need to set the runtime to browser...if you create a brand new project with `sv` and include vitest you can see a vitest.workspace.ts next to the viteconfig: you can copy that to setup your project so that you can test .svelte.js files next to .ja files