diff --git a/vitest.snapshot.config.ts b/vitest.snapshot.config.ts index 858a3fd9a1..6fad120e06 100644 --- a/vitest.snapshot.config.ts +++ b/vitest.snapshot.config.ts @@ -41,7 +41,9 @@ export default defineConfig({ test: { setupFiles: ['./scripts/test-invariants.ts'], include: [ - 'apps/web/tests/**/*.snapshot.ts', + // The assembled Web snapshot executes generated client bundles; source + // mode remains the zero-build path, while lib mode requires a prior build. + ...(process.env.DSH_EXAMPLE_MODE === 'lib' ? ['apps/web/tests/**/*.snapshot.ts'] : []), 'examples/*/tests/**/*.snapshot.ts', 'packages/sdk/*/tests/**/*.snapshot.ts', 'packages/ui/tui/tests/**/*.snapshot.ts',