Skip to content

Commit 6a8465e

Browse files
authored
test: add 404 response check for GET request to "index.html"
1 parent fe678c4 commit 6a8465e

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

test/middleware.test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5109,6 +5109,15 @@ describe.each([
51095109
);
51105110
});
51115111

5112+
it('should return the "404" code for the "GET" request to the "index.html" file', async () => {
5113+
const response = await req.get("/index.html/");
5114+
5115+
expect(response.statusCode).toBe(404);
5116+
expect(response.headers["content-type"]).toEqual(
5117+
get404ContentTypeHeader(name),
5118+
);
5119+
});
5120+
51125121
it('should return the "200" code for the "GET" request to the "index.html" file', async () => {
51135122
const response = await req.get("/index.html");
51145123

0 commit comments

Comments
 (0)