Compare commits
1 Commits
f0ea182d2f
...
main
Author | SHA1 | Date | |
---|---|---|---|
0aecd354c7 |
@@ -268,6 +268,15 @@ describe("Router", () => {
|
||||
const res = await router.handle(req);
|
||||
assertEquals(res.status, 500);
|
||||
});
|
||||
|
||||
it("should handle no handlers returning a response", async () => {
|
||||
router.get("/test", async () => undefined as unknown as Response);
|
||||
const req = new Request("http://localhost/test", {
|
||||
method: "GET",
|
||||
});
|
||||
const res = await router.handle(req);
|
||||
assertEquals(res.status, 501);
|
||||
});
|
||||
});
|
||||
|
||||
describe("HTTP Methods", () => {
|
||||
|
Reference in New Issue
Block a user