From a60258b4855f93020d1aeaad804e0f707f8eb6de Mon Sep 17 00:00:00 2001 From: Tianyi Cui <53024+tianyicui@users.noreply.github.com> Date: Thu, 23 Jul 2026 00:54:01 +0800 Subject: [PATCH] test(web): gate built snapshot on lib mode --- vitest.snapshot.config.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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',