import { readFile } from "node:fs/promises"; import test from "node:test"; import assert from "node:assert/strict"; const sourcePaths = [ new URL("../src/components/landing.tsx", import.meta.url), new URL("../src/components/landing-hero-section.tsx", import.meta.url), ]; test("Landing component contains the core brief anchors", async () => { const source = ( await Promise.all(sourcePaths.map((p) => readFile(p, "utf8"))) ).join("\n"); for (const phrase of ["Projektbrief", "01", "Website", "Kontakt", "für", "müssen", "Änderungen"]) { assert.match(source, new RegExp(phrase)); } }); test("Landing component uses real German umlauts in visible copy", async () => { const source = ( await Promise.all(sourcePaths.map((p) => readFile(p, "utf8"))) ).join("\n"); for (const asciiFallback of [ "fuer", "muessen", "spaetere", "Aenderungen", "glaubwuerdig", "naechste", "Agenturlaerm", "Erzaehlen", "Saetze", "Rueckmeldung", ]) { assert.doesNotMatch(source, new RegExp(asciiFallback)); } });