feat: build audit outreach review workspace

This commit is contained in:
Matthias
2026-06-05 16:47:22 +02:00
parent 1feccb9bdf
commit 5a42c637c6
15 changed files with 1786 additions and 38 deletions

View File

@@ -0,0 +1,23 @@
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
import { join } from "node:path";
import test from "node:test";
const dashboardThemePath = join(
process.cwd(),
"components",
"dashboard-theme.tsx",
);
test("DashboardThemeProvider keeps server and first client render stable", async () => {
const source = await readFile(dashboardThemePath, "utf8");
assert.match(source, /useSyncExternalStore\(/);
assert.match(source, /function getServerDashboardTheme\(\): DashboardTheme \{/);
assert.match(source, /return "light";/);
assert.doesNotMatch(
source,
/useState<DashboardTheme>\(\(\) => \{[\s\S]*?localStorage/,
);
assert.doesNotMatch(source, /setTheme\(/);
});