From f035bebf45bb829c570f6234eae01140ef480798 Mon Sep 17 00:00:00 2001 From: David Montero Crespo Date: Tue, 25 Aug 2026 00:13:35 +0200 Subject: [PATCH] test(config): stop running the rsynced copy of the pro overlay MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `frontend/src/pro/` is a gitignored COPY some dev setups drop in for a local pro build. `src/**/__tests__/**` picked it up, so every pro test ran twice — once from the source at ../../pro/, once from a snapshot — and any file the snapshot reads from outside frontend/ resolves against velxio/ instead of pro/. That is how pi-vision-example.test.ts started failing the deploy gate on `velxio/guest-shims/velxio_screen.py`, a path that has never existed, for a file nobody had touched. A clean OSS clone has no src/pro, so the exclude is a no-op there. --- frontend/vitest.config.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/frontend/vitest.config.ts b/frontend/vitest.config.ts index 2dd57995..4098f157 100644 --- a/frontend/vitest.config.ts +++ b/frontend/vitest.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'vitest/config'; +import { configDefaults, defineConfig } from 'vitest/config'; import path from 'path'; import fs from 'fs'; @@ -77,6 +77,17 @@ export default defineConfig({ // because the glob has nothing to match there. '../../pro/frontend/src/pro/**/__tests__/**/*.test.ts', ], + exclude: [ + ...configDefaults.exclude, + // `src/pro/` is a COPY of the overlay some dev setups rsync in for a + // local pro build (it is gitignored; a clean OSS clone has nothing + // here). The source of truth is the ../../pro/... glob above, so + // running the copy duplicates the whole pro suite — and the copy's + // paths to files OUTSIDE frontend/ (pro/guest-shims, pro/frontend/ + // public) resolve to velxio/ from there and simply do not exist, so a + // stale snapshot fails the deploy gate for a file nobody edited. + 'src/pro/**', + ], testTimeout: 30_000, hookTimeout: 30_000, // Vitest 4 removed `test.poolOptions` — config moved to top-level