Compare commits

..

1 Commits

Author SHA1 Message Date
0aecd354c7 tests passing 2025-07-03 01:48:25 -06:00

View File

@@ -268,6 +268,15 @@ describe("Router", () => {
const res = await router.handle(req); const res = await router.handle(req);
assertEquals(res.status, 500); 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", () => { describe("HTTP Methods", () => {