Keep draft notes off the How it works guide, link the conflict article, and print only the rule card.

This commit is contained in:
adilallo committed 2026-11-12 18:06:41 -07:00
1 parent 453139c783
commit 95f7291c45
7 files changed
+136 -61

No files matched your search

+10 -4
View File
@@ -15,13 +15,19 @@ describe("howItWorksGuide", () => {
expect(formatHowItWorksDate(page.banner.date)).toBe("18 February 2027");
const minutes = howItWorksReadMinutes(page);
expect(minutes).toBeGreaterThanOrEqual(10);
expect(formatHowItWorksByline(page, minutes)).toBe(
`By CommunityRule Creative Team. 18 February 2027. ${minutes} minute read. `,
expect(formatHowItWorksByline(page, 1)).toBe(
"By CommunityRule Creative Team. 18 February 2027. 1 minute read. ",
);
expect(collectHowItWorksGuideText(page)).toContain(
expect(formatHowItWorksByline(page, minutes)).toBe(
`By CommunityRule Creative Team. 18 February 2027. ${minutes} minutes read. `,
);
const guideText = collectHowItWorksGuideText(page);
expect(guideText).toContain(
"A Rule is a short document your community can read aloud in a few minutes.",
);
expect(collectHowItWorksGuideText(page)).not.toContain("](/kit)");
expect(guideText).toContain("Resolving Active Conflicts");
expect(guideText).not.toContain("](/kit)");
expect(guideText).not.toMatch(/\[[^\]]*\]/);
});
it("builds wiki markdown from the title, description and URL", () => {