Publish three learning skill articles with one shared Xiaohongshu-style cover
PROMPT Docker CI and deployment / verify-and-deploy (push) Has been cancelled

This commit is contained in:
2026-10-23 01:28:12 +08:00
parent 818b1894e7
commit 68b2bcab1f
19 changed files with 273 additions and 6 deletions
+16
View File
@@ -0,0 +1,16 @@
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);
}
}
});