verify-references ran a bare `npx vitest run` in the staged reference, which fetched an unrelated vitest that could not load the reference config. It now installs the reference's devDependencies first. sync-check also checks each module's expansion/tests against ### headings in expansion/README.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
23 lines
853 B
JavaScript
23 lines
853 B
JavaScript
import { test } from "node:test";
|
|
import assert from "node:assert/strict";
|
|
import { run, fixtures } from "./helpers.mjs";
|
|
import { join } from "node:path";
|
|
|
|
test("sync_detects_missing_ts_test", () => {
|
|
const r = run("sync-check.mjs", [], { COURSE_ROOT: join(fixtures, "course-bad") });
|
|
assert.equal(r.code, 1);
|
|
assert.match(r.out, /test_01_a/);
|
|
assert.match(r.out, /test_01_b/);
|
|
});
|
|
|
|
test("sync_passes_consistent_course", () => {
|
|
const r = run("sync-check.mjs", [], { COURSE_ROOT: join(fixtures, "course") });
|
|
assert.equal(r.code, 0, r.out);
|
|
});
|
|
|
|
test("sync_checks_expansion_tests_against_readme", () => {
|
|
const r = run("sync-check.mjs", [], { COURSE_ROOT: join(fixtures, "course-bad") });
|
|
assert.match(r.out, /01-a expansion: test_01x_c missing from ts/);
|
|
assert.match(r.out, /01-a expansion: test_01x_c missing from scenarios/);
|
|
});
|