import assert from "node:assert/strict"; import { readFile } from "node:fs/promises"; import { join } from "node:path"; import test from "node:test"; test("dashboard sidebar links do not prefetch protected routes", async () => { const source = await readFile( join(process.cwd(), "components", "dashboard-sidebar.tsx"), "utf8", ); const linkMatch = source.match(//); assert.ok(linkMatch, "Dashboard sidebar should render dashboard nav Links."); assert.match(linkMatch[0], /prefetch=\{false\}/); }); test("lead funnel card action links do not fan out prefetches", async () => { const source = await readFile( join(process.cwd(), "components", "lead-funnel-board.tsx"), "utf8", ); const actionLinkMatch = source.match( //, ); assert.ok(actionLinkMatch, "Lead funnel cards should link to stage actions."); assert.match(actionLinkMatch[0], /prefetch=\{false\}/); });