Skip to content

Commit

Permalink
test: update src/core/definer.test.ts
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
omermecitoglu and coderabbitai[bot] authored Oct 18, 2024
1 parent 656d06e commit ff50a03
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/core/definer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,7 @@ describe("defineRoute", () => {
});

it("should use custom error handler correctly for an expected error", async () => {
mockRequest.json.mockImplementation(() => {
throw new SyntaxError("Unexpected end of JSON input");
});
mockRequest.json.mockRejectedValue(new SyntaxError("Unexpected end of JSON input"));

const route = defineRoute({
operationId: "postExample",
Expand Down

0 comments on commit ff50a03

Please sign in to comment.