fix(server): middleware order incorrect (#1280)

This commit is contained in:
Reed von Redwitz
2023-07-10 15:19:52 +02:00
committed by GitHub
parent 724c81f2c7
commit d4c2258eb6
8 changed files with 207 additions and 22 deletions
+15
View File
@@ -593,6 +593,21 @@ Deno.test({
},
});
Deno.test({
name: "middleware nesting order",
fn: async () => {
const resp = await handler(
new Request(
"https://fresh.deno.dev/layeredMdw/nesting/acme/production/abc",
),
);
assert(resp);
assertEquals(resp.status, Status.OK);
const body = await resp.text();
assertStringIncludes(body, "<div>1234</div>");
},
});
Deno.test({
name: "/not_found",
fn: async () => {