fix layout SSR translations and remediation follow-ups

This commit is contained in:
2026-08-09 18:49:16 +05:30
parent 51286d0fa3
commit 7d87200e31
10 changed files with 160 additions and 89 deletions
+5 -1
View File
@@ -60,10 +60,14 @@ describe("full app", () => {
});
afterAll(() => app?.close());
test("home page responds with HTML", async () => {
test("home page server-renders translated page and layout text", async () => {
const res = await app.fetch("/");
expect(res.status).toBe(200);
expect(res.headers.get("content-type")).toContain("text/html");
const html = await res.text();
expect(html).toContain('<span data-t="nav.home">Home</span>');
expect(html).toContain('<span data-t="home.title">Hello from WrNexus</span>');
expect(html).not.toContain('<span data-t="nav.home"></span>');
});
test("GET /api/hello returns a translated greeting", async () => {