test: wire the orphaned scripts/ test suite to a vitest runner

scripts/*.test.mjs had NO runner: scripts/ is not a workspace package
(turbo never reaches it) and no CI step invoked node --test, so all 16
files — 241 assertions over conformance, coverage, compliance,
library-decisions and work tooling — were dead. Wire them via a root
vitest.scripts.config.mjs + 'pnpm test:scripts' + a CI validate step,
converting the node:test imports to vitest (node:assert kept, same
pattern as the generators' release-please-utils conversion). First-run
fallout fixed: the work fixtures missed the epics/ subdir buildState
walks, the expected epic shape lacked the prd field, the CLI dispatch
test assumed a ready task exists, and the state-sync-guard smoke held
an unused binding.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-10 17:32:14 +02:00
parent 1883883911
commit c60277ebe6

View File

@@ -8,9 +8,10 @@ const GUARD = path.join(__dirname, "state-sync-guard.mjs");
describe("state-sync-guard smoke", () => {
it("exits 0 when run against the repo's current state (since main is in sync)", () => {
// Run the guard; if main's _state.json drifts, this test will fail and tell us.
const result = execSync(`node "${GUARD}"`, { encoding: "utf8" });
// No assertion on output; the exit code is 0 if we got here without throwing.
expect(true).toBe(true);
// Run the guard; if main's _state.json drifts, execSync throws (non-zero
// exit) and this test fails with the guard's output.
expect(() =>
execSync(`node "${GUARD}"`, { encoding: "utf8" }),
).not.toThrow();
});
});