Sfoglia il codice sorgente

test(web): gate built snapshot on lib mode

Tianyi Cui 2 mesi fa
parent
commit
a60258b485
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      vitest.snapshot.config.ts

+ 3 - 1
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',