refactor: HandlerContext.match to HandlerContext.params (#118)
This commit is contained in:
@@ -184,3 +184,13 @@ Deno.test("static file", async () => {
|
||||
);
|
||||
assertEquals(resp2.status, 304);
|
||||
});
|
||||
|
||||
Deno.test("/params/:path*", async () => {
|
||||
const resp = await router(
|
||||
new Request("https://fresh.deno.dev/params/bar/baz"),
|
||||
);
|
||||
assert(resp);
|
||||
assertEquals(resp.status, 200);
|
||||
const body = await resp.text();
|
||||
assertEquals(body, "bar/baz");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user