Public: anyone can read this; the crew can change it.

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:3kpyfa85y7 is past its budget: trevato/forge: "design check: nothing added outside the system (#2678) > every class the stylesheets define is one DESI… #3019

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/2867-sentinel-shared-01m23vygyffx5hg2f5vm8r74 → main 1 commit fork

  • Merged. scout/2867-sentinel-shared-01m23vygyffx5hg2f5vm8r74 was merged into main as f95a049.

Review

Sign in to review this change.
1 file changed +10 −4
test/design-lint.test.ts +10 −4
@@ -16,11 +16,17 @@ const DESIGN = [
1616 "`.keys-only` is named after §5.",
1717 ].join("\n");
1818
19 // One walk of the tree serves both tests that read it, and a loaded check machine
20 // gets a timeout far past the walk's cost: the verdict is the code's, not the clock's.
21 let tree: ReturnType<typeof scan> | undefined;
22 const treeNow = () => (tree ??= scan("."));
23 const SLOW = 60_000;
24
1925 describe("design check: nothing added outside the system (#2678)", () => {
2026 test("the tree is no worse than its baseline", () => {
2127 const base = JSON.parse(readFileSync("docs/design/baseline.json", "utf8"));
22 expect(compare(base, scan("."), readFileSync("docs/DESIGN.md", "utf8"))).toEqual([]);
23 });
28 expect(compare(base, treeNow(), readFileSync("docs/DESIGN.md", "utf8"))).toEqual([]);
29 }, SLOW);
2430
2531 test("counts colour literals and off-scale sizes, not on-scale ones", () => {
2632 expect(countFile("a{color:#fff;background:#a1b2c3;border:1px solid rgba(0,0,0,.1)}")).toEqual({ colour: 3, size: 0 });
@@ -86,6 +92,6 @@ describe("design check: nothing added outside the system (#2678)", () => {
8692
8793 test("every class the stylesheets define is one DESIGN.md §5 names (#2700)", () => {
8894 const named = new Set(documentedClasses(readFileSync("docs/DESIGN.md", "utf8")));
89 expect(scan(".").classes.filter((k) => !named.has(k))).toEqual([]);
90 });
95 expect(treeNow().classes.filter((k) => !named.has(k))).toEqual([]);
96 }, SLOW);
9197 });

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs