Files
hyperframes/scripts/lefthook-order.test.mjs
Miguel Ángel 603f4214ff fix: Remotion ports keep box sizes, the manifest hook runs after format, a drag test stops flaking (#6392)
* feat(skills): a Remotion port carries Remotion's box-sizing rule so bordered boxes keep their size

* chore(skills): regenerate the skills manifest after the format pass

* fix(hooks): the skills manifest is hashed after the formatter has run

* test(studio): a drag is measured against the box the preview shows

* test(studio): another element is read bare until it is selected
2026-10-26 07:20:03 +00:00

21 lines
959 B
JavaScript

import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import { dirname, join } from "node:path";
import { test } from "node:test";
import { fileURLToPath } from "node:url";
import { parse } from "yaml";
const config = parse(
readFileSync(join(dirname(fileURLToPath(import.meta.url)), "..", "lefthook.yml"), "utf8"),
);
const jobs = config["pre-commit"].jobs ?? [];
test("the skills manifest is hashed after the formatter has rewritten the skills", () => {
const group = jobs.find((job) => job.group?.jobs?.some((j) => j.name === "skills-manifest"));
assert.ok(group, "skills-manifest must sit in a group, not run beside the formatter");
assert.equal(group.group.piped, true, "the group must run its jobs in order");
const names = group.group.jobs.map((j) => j.name);
assert.ok(names.includes("format"), "the group must hold the formatter");
assert.ok(names.indexOf("format") < names.indexOf("skills-manifest"));
});