Files
stack/apps/api/scripts/vitest-runner.mjs
T
orch-01 76ac84a3e6 rescue(ms-gate-001): preserve uncommitted gatekeeper WIP found in canonical clone (Q19 O1, Jason 2026-08-25)
Gatekeeper module (Gitea PR-webhook -> pending merges), AddPendingMerges
migration, vitest-runner, webhook edits, compose/CI/env/docs touches.
Applied to the tree in a single event 2026-08-23 18:45, author unknown.
Base main@32896770 (2026-03-09). Rescued verbatim for remediation per
board row; no functional review implied.
2026-08-25 12:06:32 -05:00

37 lines
817 B
JavaScript

import { spawnSync } from "node:child_process";
import { join } from "node:path";
const rawArgs = process.argv.slice(2);
const passthroughArgs = [];
for (let index = 0; index < rawArgs.length; index += 1) {
const arg = rawArgs[index];
if (arg === "--testPathPattern") {
const value = rawArgs[index + 1];
if (value) {
passthroughArgs.push(value);
index += 1;
}
continue;
}
if (arg.startsWith("--testPathPattern=")) {
passthroughArgs.push(arg.slice("--testPathPattern=".length));
continue;
}
passthroughArgs.push(arg);
}
const vitestBin = join(process.cwd(), "node_modules", ".bin", "vitest");
const result = spawnSync(vitestBin, ["run", ...passthroughArgs], {
stdio: "inherit",
});
if (result.error) {
throw result.error;
}
process.exit(result.status ?? 1);