refactor: make App.prototype.handler() sync (#2906)

This commit is contained in:
Tim Reichen
2025-05-12 10:12:50 +02:00
committed by GitHub
parent 9605cd81b5
commit 1cfb4bc876
13 changed files with 49 additions and 48 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ Deno.test({
return ctx.render(<View />);
});
const server = new FakeServer(await app.handler());
const server = new FakeServer(app.handler());
let res = await server.get("/active_nav");
let doc = parseHtml(await res.text());
+1 -1
View File
@@ -25,7 +25,7 @@ const app = new App({ staticDir: "./static" }).get(
),
);
const handler = await app.handler();
const handler = app.handler();
const res = await handler(new Request("http://localhost/"));
// deno-lint-ignore no-console
console.log(await res.text());
+1 -1
View File
@@ -718,7 +718,7 @@ Deno.test({
</Doc>,
));
const server = new FakeServer(await app.handler());
const server = new FakeServer(app.handler());
const res = await server.get("/");
await res.body?.cancel();
+3 -3
View File
@@ -188,7 +188,7 @@ Deno.test({
);
});
const server = new FakeServer(await app.handler());
const server = new FakeServer(app.handler());
let checked = false;
try {
const res = await server.get("/");
@@ -306,7 +306,7 @@ Deno.test({
});
await buildProd(app);
const server = new FakeServer(await app.handler());
const server = new FakeServer(app.handler());
let checked = false;
try {
const res = await server.get("/");
@@ -845,7 +845,7 @@ Deno.test({
);
});
const server = new FakeServer(await app.handler());
const server = new FakeServer(app.handler());
const res = await server.get("/");
const html = await res.text();
+1 -1
View File
@@ -83,7 +83,7 @@ export async function withBrowserApp(
hostname: "localhost",
port: 0,
signal: aborter.signal,
}, await app.handler());
}, app.handler());
const browser = await launch({
args: [