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", () => {
// 原值:`import { Clock3, Sparkles }`、``,且 doesNotMatch /Moon|MoonStar|thinking-orbs/
// 新值:`import { Clock3, MoonStar }`、``,doesNotMatch 收窄为 /Sparkles|thinking-orbs/
// 原因:TASK-starter-home-polish-20260926 D3 产品拍板今日星语入口改 lucide MoonStar(与右上角点数不再同图标);
// 「不加循环动画、不引入 thinking-orbs」这条意图原样保留,并反向锁住旧图标不回来。
assert.match(starterHome, /import \{ Clock3, MoonStar \} from "lucide-react"/);
assert.match(starterHome, //);
assert.match(starterHome, //);
assert.doesNotMatch(starterHome, /Sparkles|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/);
});