From 08fae8ec9a1d4ca1ce89f40d6b1d6d672cf2de00 Mon Sep 17 00:00:00 2001 From: Dotta Date: Tue, 11 Aug 2026 23:45:28 +0000 Subject: [PATCH] test: ignore compiled output in Vitest runner Keep workspace test discovery on source files after a local build and give only the embedded-Postgres DB project a longer integration timeout. Co-Authored-By: Paperclip --- scripts/run-vitest-stable.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/run-vitest-stable.mjs b/scripts/run-vitest-stable.mjs index d8b334e58f0..26e0d49081d 100644 --- a/scripts/run-vitest-stable.mjs +++ b/scripts/run-vitest-stable.mjs @@ -256,6 +256,10 @@ function selectSerializedSuites(routeTests, shardIndex, shardCount) { function runVitest(args, label) { console.log(`\n[test:run] ${label}`); invocationIndex += 1; + const stableArgs = ["--exclude", "**/dist/**"]; + if (args.includes("@paperclipai/db")) { + stableArgs.push("--testTimeout=30000"); + } const tempRootParent = process.platform === "win32" ? os.tmpdir() : "/tmp"; const testRoot = mkdtempSync(path.join(tempRootParent, `pcvt-${process.pid}-${invocationIndex}-`)); // Keep per-run paths compact so Unix socket fixtures stay under macOS path limits. @@ -268,7 +272,7 @@ function runVitest(args, label) { }; mkdirSync(env.PAPERCLIP_HOME, { recursive: true }); mkdirSync(env.TMPDIR, { recursive: true }); - const result = spawnSync("pnpm", ["exec", "vitest", "run", ...args], { + const result = spawnSync("pnpm", ["exec", "vitest", "run", ...stableArgs, ...args], { cwd: repoRoot, env, stdio: "inherit",