chore(server): simplify plugin route creation (#1594)
This commit is contained in:
@@ -81,6 +81,19 @@ Deno.test("plugin middleware multiple handlers", async () => {
|
||||
);
|
||||
});
|
||||
|
||||
Deno.test("plugin route no leading slash", async () => {
|
||||
const resp = await router(
|
||||
new Request("https://fresh.deno.dev/no-leading-slash-here"),
|
||||
);
|
||||
assert(resp);
|
||||
assertEquals(resp.status, Status.OK);
|
||||
const body = await resp.text();
|
||||
assertStringIncludes(
|
||||
body,
|
||||
`<div>Hello</div>`,
|
||||
);
|
||||
});
|
||||
|
||||
Deno.test({
|
||||
name: "/with-island hydration",
|
||||
async fn(t) {
|
||||
|
||||
Reference in New Issue
Block a user