mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-10-18 19:30:27 +08:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user