feat: add build.outDir option (#1797)

This commit is contained in:
Marvin Hagemeister
2023-09-20 10:40:09 +02:00
committed by GitHub
parent ff6ae7eb7f
commit 3fd8fe89d3
30 changed files with 846 additions and 448 deletions
+5 -6
View File
@@ -53,20 +53,19 @@ Deno.test("adds refresh script to html", async () => {
});
Deno.test("preact/debug is active in dev mode", async () => {
await withPageName(
await withFakeServe(
"./tests/fixture_render_error/dev.ts",
async (page, address) => {
async (server) => {
// SSR error is shown
const resp = await fetch(address);
const resp = await server.get("/");
const text = await resp.text();
assertEquals(resp.status, Status.InternalServerError);
assertStringIncludes(text, "Objects are not valid as a child");
await page.goto(address);
const html = await server.getHtml("/");
// Error page is shown with error message
const el = await page.waitForSelector(".frsh-error-page");
const text2 = await page.evaluate((el) => el.textContent, el);
const text2 = html.querySelector(".frsh-error-page")!.textContent!;
assertStringIncludes(text2, "Objects are not valid as a child");
},
);