Skip to content

Commit ff50a03

Browse files
test: update src/core/definer.test.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 656d06e commit ff50a03

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/core/definer.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,7 @@ describe("defineRoute", () => {
246246
});
247247

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

253251
const route = defineRoute({
254252
operationId: "postExample",

0 commit comments

Comments
 (0)