refactor: make App.prototype.handler() sync (#2906)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user