Files
codex-bot ad398db781
waterfall-wiki CI and deployment / verify-and-deploy (push) Has been cancelled
studio CI and deployment / verify-and-deploy (push) Successful in 9m15s
Restore PROMPT branding, rename waterfall-wiki, and add system tag workflows
2026-10-27 00:35:59 +08:00

17 lines
895 B
TypeScript

import assert from "node:assert/strict";
import { test } from "node:test";
import { chapters, seriesCover } from "../src/content/learning-skills/data";
test("the authored series has three distinct chapters of ten sourced skills and one cover",()=>{
assert.equal(chapters.length,3);assert.equal(new Set(chapters.map(c=>c.key)).size,3);
assert.equal(new Set(chapters.map(c=>c.slug)).size,3);assert.equal(seriesCover,"/learning-skills/cover.png");
for(const chapter of chapters){
assert.equal(chapter.skills.length,10);assert.equal(new Set(chapter.skills.map(s=>s.source)).size,10);
for(const skill of chapter.skills){
const source=new URL(skill.source);assert.equal(source.protocol,"https:");assert.equal(source.hostname,"github.com");
assert.ok(skill.title&&skill.input&&skill.output&&skill.prompt&&skill.note);
assert.equal(skill.sample.length,3);
}
}
});