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>
18 lines
666 B
JavaScript
18 lines
666 B
JavaScript
import { describe, it, expect } from "vitest";
|
|
import { execSync } from "node:child_process";
|
|
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
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, execSync throws (non-zero
|
|
// exit) and this test fails with the guard's output.
|
|
expect(() =>
|
|
execSync(`node "${GUARD}"`, { encoding: "utf8" }),
|
|
).not.toThrow();
|
|
});
|
|
});
|