test(config): stop running the rsynced copy of the pro overlay

`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.
This commit is contained in:
David Montero Crespo 2026-08-25 00:13:35 +02:00
parent 0b3e165784
commit f035bebf45
1 changed files with 12 additions and 1 deletions

View File

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