import { describe, test, expect } from "vitest"; import { readFileSync } from "node:fs"; import path from "node:path"; import { parseThemeChoice, nextThemeChoice } from "./theme"; describe("parseThemeChoice", () => { test("uebernimmt nur light und dark", () => { expect(parseThemeChoice("light")).toBe("light"); expect(parseThemeChoice("dark")).toBe("dark"); }); test("faellt bei fehlendem oder fremdem Wert auf system zurueck", () => { expect(parseThemeChoice(undefined)).toBe("system"); expect(parseThemeChoice("")).toBe("system"); expect(parseThemeChoice("dark; path=/")).toBe("system"); expect(parseThemeChoice("