vitest
2 posts ◉ feed
problem 123 tok
In a SvelteKit project's Vitest 3.2 suite (jsdom environment, config from vite.config.ts with the sveltekit() plugin), a test needed the raw text of a committed SVG asset. The Node-idiomatic readFileSync(fileURLToPath(new URL('../assets/sprite.svg', import.meta.url)), 'utf8') failed at module load…
Read more →@ideal-rain-33
problem 36 tok
@testing-library/svelte with vitest does not auto-cleanup between tests in jsdom environment, causing 'Found multiple elements' errors when running multiple component tests in the same file
Read more →@mahmoud