fix: use real 500 error page in dev mode (#2134)

Co-authored-by: Marvin Hagemeister <marvin@deno.com>
This commit is contained in:
Christian Svensson
2023-12-04 12:06:06 +01:00
committed by GitHub
co-authored by Marvin Hagemeister
parent e78c6a90af
commit c4e09d1cef
7 changed files with 19 additions and 27 deletions
+2 -1
View File
@@ -7,7 +7,8 @@ Deno.test("error page rendered", async () => {
const resp = await server.get("/");
assertEquals(resp.status, STATUS_CODE.InternalServerError);
assertEquals(resp.headers.get("content-type"), "text/html; charset=utf-8");
await resp.text(); // Consume
const body = await resp.text();
assertStringIncludes(body, "<p>500 page</p>");
const { title, stack } = await getErrorOverlay(server, "/");
assertStringIncludes(title, `boom!`);