docs(web): record the icon and motion audit without swapping icons

This commit is contained in:
jesse-ux
2026-09-22 13:07:04 +08:00
parent 90eaf24454
commit 17c5b10cff
4 changed files with 53 additions and 1 deletions
+19
View File
@@ -0,0 +1,19 @@
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import test from "node:test";
const starterHome = readFileSync(new URL("../src/components/starter-home.tsx", import.meta.url), "utf8");
const css = readFileSync(new URL("../src/app/globals.css", import.meta.url), "utf8");
test("the 2026-09-22 icon audit keeps the existing entry icons and adds no loop", () => {
assert.match(starterHome, /import \{ Clock3, Sparkles \} from "lucide-react"/);
assert.match(starterHome, /<Sparkles aria-hidden="true" \/>/);
assert.match(starterHome, /<Clock3 aria-hidden="true" \/>/);
assert.doesNotMatch(starterHome, /Moon|MoonStar|thinking-orbs/);
const blockStart = css.indexOf(".starter-entry {");
const blockEnd = css.indexOf(".starter-entry > svg");
const block = css.slice(blockStart, blockEnd);
assert.doesNotMatch(block, /animation:/);
assert.doesNotMatch(css, /thinking-orbs/);
assert.match(css, /@media \(prefers-reduced-motion:\s*reduce\)[\s\S]*transition-duration:\s*\.01ms !important/);
});