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
+3 -3
View File
@@ -38,7 +38,7 @@ Deno.test("render asset()", async () => {
</>,
));
const server = new FakeServer(await app.handler());
const server = new FakeServer(app.handler());
const res = await server.get("/");
const doc = parseHtml(await res.text());
@@ -52,7 +52,7 @@ Deno.test("ctx.render - throw with no arguments", async () => {
const app = new App()
// deno-lint-ignore no-explicit-any
.get("/", (ctx) => (ctx as any).render());
const server = new FakeServer(await app.handler());
const server = new FakeServer(app.handler());
const res = await server.get("/");
await res.body?.cancel();
@@ -63,7 +63,7 @@ Deno.test("ctx.render - throw with invalid first arg", async () => {
const app = new App()
// deno-lint-ignore no-explicit-any
.get("/", (ctx) => (ctx as any).render({}));
const server = new FakeServer(await app.handler());
const server = new FakeServer(app.handler());
const res = await server.get("/");
await res.body?.cancel();