docs: teach component setup with verified examples

This commit is contained in:
2026-08-10 14:18:42 +05:30
parent 186f97de37
commit bec9ef2889
11 changed files with 93 additions and 24 deletions
+21
View File
@@ -349,6 +349,27 @@ test("generated playground boolean states avoid multiline-sensitive ternaries",
}
});
test("getting started and customization guides include code, outcomes, and verification", () => {
for (const slug of [
"installation",
"framework-guides",
"accessibility",
"resources",
"dark-mode",
"themes",
"colors",
"fonts",
"sizing",
]) {
const source = readFileSync(join(pagesDir, `${slug}.wrn`), "utf8");
expect(source).toContain("Configure and use it");
expect(source).toContain("What changes after this");
expect(source).toContain("Verify the result");
expect(source).toContain("Expected result");
expect(source).toContain("<pre><code>");
}
});
test("every generated showcase page compiles and is accepted by the route syntax parser", () => {
const paths = [
...readdirSync(pagesDir)