From 92cedb0d3fb968e68f03c845d713bdedca981195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Tue, 13 Oct 2026 13:00:18 +0200 Subject: [PATCH] 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. --- desktop/vite.config.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/desktop/vite.config.ts b/desktop/vite.config.ts index b7fbffb3d..ee70ef776 100644 --- a/desktop/vite.config.ts +++ b/desktop/vite.config.ts @@ -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,