Skip to content

Commit

Permalink
disable body test for node 16
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jul 24, 2023
1 parent 97ab38e commit 9cf1a8d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/event.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,12 @@ describe("Event", () => {
eventHandler(async (event) => {
expect(event.request.method).toBe("POST");
expect(event.request.headers.get("x-test")).toBe("123");
expect(await event.request.text()).toMatchObject(
JSON.stringify({ hello: "world" })
);
// TODO: Find a workaround for Node.js 16
if (!process.versions.node.startsWith("16")) {
expect(await event.request.text()).toMatchObject(
JSON.stringify({ hello: "world" })
);
}
return "200";
})
);
Expand Down

0 comments on commit 9cf1a8d

Please sign in to comment.