feat: add locale, palette, and theme controls to site header

This commit is contained in:
mlogclub
2026-06-21 10:32:44 +08:00
parent 991243625d
commit 94c9292988
2 changed files with 22 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
import { describe, it } from "node:test";
const source = await readFile(new URL("./site-header.tsx", import.meta.url), "utf8");
describe("site header preferences", () => {
it("renders locale, palette, and theme controls in the dashboard header", () => {
assert.match(source, /import \{ LocaleSwitcher \} from "@\/components\/locale-switcher"/);
assert.match(source, /import \{ PaletteToggle \} from "@\/components\/palette-toggle"/);
assert.match(source, /import \{ ThemeToggle \} from "@\/components\/theme-toggle"/);
assert.match(source, /<LocaleSwitcher \/>[\s\S]*<PaletteToggle \/>[\s\S]*<ThemeToggle \/>/);
});
});