Skip to content

Commit

Permalink
ai fix
Browse files Browse the repository at this point in the history
  • Loading branch information
iamanishx committed Feb 17, 2025
1 parent 474b0e3 commit 5b6771e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/routes/graphql/Mutation/deletecomment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,9 @@ describe("deleteCommentResolver", () => {

await deleteCommentResolver({}, validArgs, ctx);
expect(commentFindFirstSpy).toHaveBeenCalledTimes(1);
if (!commentFindFirstSpy.mock.calls[0]) {
throw new Error("Expected mock to have been called");
}
expect(commentFindFirstSpy.mock.calls.length).toBeGreaterThan(0);
const config = commentFindFirstSpy.mock
.calls[0][0] as CommentsFindFirstConfig;
.calls[0]?.[0] as CommentsFindFirstConfig;

expect(config.columns).toEqual({ creatorId: true });
expect(typeof config.where).toBe("function");
Expand Down

0 comments on commit 5b6771e

Please sign in to comment.