complete performance and reliability follow-ups

This commit is contained in:
2026-08-09 23:04:36 +05:30
parent 8f19a5eb2b
commit 232d8e6734
31 changed files with 525 additions and 726 deletions
+13
View File
@@ -70,6 +70,19 @@ describe("full app", () => {
expect(html).not.toContain('<span data-t="nav.home"></span>');
});
test("home page ships only its active theme stylesheet", async () => {
const response = await app.fetch("/");
const html = await response.text();
const href = html.match(/data-wrnexus-theme href="([^"]+)"/)?.[1];
expect(href).toContain("/__wrnexus/theme/dark/");
expect(html).not.toContain('href="/__wrnexus/theme.css');
const cssResponse = await app.fetch(String(href));
expect(cssResponse.status).toBe(200);
const css = await cssResponse.text();
expect(css.length).toBeLessThan(10_000);
expect(css).not.toContain("[data-theme=");
});
test("GET /api/hello returns a translated greeting", async () => {
const res = await app.fetch("/api/hello");
expect(res.status).toBe(200);