import test from "node:test"; import assert from "node:assert/strict"; import { mkdtempSync, mkdirSync, readFileSync, writeFileSync } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path"; import { beaconProblems, checkCoreSkills, descriptionOf, missingPaths, registeredCommands, unknownCommands, } from "./check-core-skills.mjs"; test("the repo's core skills pass", () => { assert.deepEqual(checkCoreSkills(), []); }); test("the skills teach the direct sign-in, not the old key and executable rules", () => { const read = (path) => readFileSync(new URL(`../skills/${path}`, import.meta.url), "utf8"); assert.doesNotMatch(read("reverse-any-video/references/people.md"), /Without a HeyGen key/); assert.doesNotMatch(read("media-use/SKILL.md"), /HeyGen calls also need/); const heygen = read("media-use/references/heygen.md"); assert.match(heygen, /~\/\.hyperframes\/credentials/); assert.doesNotMatch(heygen, /~\/\.heygen\/credentials/); }); test("the paid-plan cloud final keeps the composition fps and high quality", () => { for (const path of ["hyperframes-cli/SKILL.md", "hyperframes-cli/references/cloud.md"]) { const text = readFileSync(new URL(`../skills/${path}`, import.meta.url), "utf8"); assert.match(text, /`cloud render --fps --quality high -o [^`]+`/, path); } }); test("media-use lists Voice Turbo as free only on the Free plan, not for every sign-in", () => { const text = readFileSync(new URL("../skills/media-use/SKILL.md", import.meta.url), "utf8"); assert.match(text, /\| Voice Turbo, Free plan: 3 min a month \| Voice Turbo on a paid plan/); assert.doesNotMatch(text, /Voice Turbo \(signed in\)/); }); test("reverse builds the project with init --video and asks for the run's total once", () => { const read = (path) => readFileSync(new URL(`../skills/reverse-any-video/${path}`, import.meta.url), "utf8"); const start = read("references/start.md"); assert.match( start, /`npx hyperframes init --video