diff options
Diffstat (limited to 'src/routes.test.ts')
| -rw-r--r-- | src/routes.test.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/routes.test.ts b/src/routes.test.ts index 3579011..90084f6 100644 --- a/src/routes.test.ts +++ b/src/routes.test.ts @@ -117,6 +117,17 @@ describe("Static files", () => { .expect(200); expect(res.text).toEqual(buffer.toString("utf-8")); }); + + it("should return 404.html at unhandled endpoints", async () => { + const buffer = await fs.promises.readFile( + path.join(staticRoot, "404.html") + ); + + const res = await request() + .get("/thisisnotanendpoint") + .expect(404); + expect(res.text).toEqual(buffer.toString("utf-8")); + }); }); describe("Badges and reports", () => { |
