Fix desktop unit tests in CI

Vitest's Rolldown picked up the root tsconfig.json, which extends a
package only the explorer installs, so the tests failed to start when
only desktop's dependencies were installed.
This commit is contained in:
Rūdolfs Ošiņš
2026-10-13 17:23:20 +02:00
parent 520e20c835
commit 92cedb0d3f
+8
View File
@@ -84,6 +84,14 @@ export default defineConfig({
],
},
},
environments: {
// Vitest bundles its dependencies with Rolldown, which looks up a
// tsconfig for them and can reach the repository root's. That one
// extends a package only the explorer installs, so the lookup fails
// when only desktop's dependencies are installed, as in CI.
// eslint-disable-next-line @typescript-eslint/naming-convention
__vitest__: { optimizeDeps: { rolldownOptions: { tsconfig: false } } },
},
resolve: {
// Svelte's server build never runs effects, which rune tests need.
conditions: process.env.VITEST ? ["browser"] : undefined,