fix: codeframe not visible with custom _500.tsx (#1869)

This commit is contained in:
Marvin Hagemeister
2023-10-05 16:29:22 +02:00
committed by GitHub
parent a838a6c733
commit 4044b5be78
8 changed files with 81 additions and 2 deletions
+19
View File
@@ -149,3 +149,22 @@ Deno.test("shows custom 500 page for rendering errors when not in dev", async (t
});
});
});
Deno.test("show codeframe in dev mode even with custom 500", async () => {
await withFakeServe(
"./tests/fixture_dev_codeframe/dev.ts",
async (server) => {
const doc = await server.getHtml(`/`);
assertSelector(doc, ".frsh-error-page");
},
);
await withFakeServe(
"./tests/fixture_dev_codeframe/main.ts",
async (server) => {
const doc = await server.getHtml(`/`);
assertNotSelector(doc, ".frsh-error-page");
assertSelector(doc, "h1");
},
);
});