test(web): gate built snapshot on lib mode

This commit is contained in:
Tianyi Cui
2026-07-23 00:54:01 +08:00
parent fc23a89208
commit a60258b485

View File

@@ -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',