mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-10-30 09:16:55 +00:00
* 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
21 lines
959 B
JavaScript
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"));
|
|
});
|