Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jun 26, 2024
1 parent ca89025 commit e786026
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/utils/static.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export async function serveStatic(
}

if (event.method === "HEAD") {
return null;
return "";
}

const contents = await options.getContents(id);
Expand Down
4 changes: 2 additions & 2 deletions test/status.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ describe("setResponseStatus", () => {
"/test",
eventHandler((event) => {
setResponseStatus(event, 418, "status-text");
return null;
return "";
}),
);

Expand All @@ -103,7 +103,7 @@ describe("setResponseStatus", () => {
expect(res).toMatchObject({
status: 418,
statusText: "status-text",
body: undefined,
body: "",
headers: {},
});
});
Expand Down

0 comments on commit e786026

Please sign in to comment.