Skip to content

Commit 34929bd

Browse files
committed
code quality fixes
1 parent 52af1e9 commit 34929bd

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/graphql/types/Event/updatedAt.test.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe("Event UpdatedAt Resolver Tests", () => {
5050
);
5151
});
5252

53-
it("should throw unauthenticated error is userId exists but current user doesn't exists", async () => {
53+
it("should throw unauthenticated error if userId exists but current user doesn't exists", async () => {
5454
const currentUser = undefined;
5555
mocks.drizzleClient.query.usersTable.findFirst.mockResolvedValue(
5656
currentUser,
@@ -202,21 +202,20 @@ describe("Event UpdatedAt Resolver Tests", () => {
202202

203203
it("should handle invalid organizationId", async () => {
204204
mockEvent.organizationId = null as unknown as string;
205-
205+
206206
mocks.drizzleClient.query.usersTable.findFirst.mockImplementation(() => {
207207
throw new TalawaGraphQLError({
208208
message: "Unauthorized action", // Include a message for clarity
209209
extensions: { code: "unauthorized_action" },
210210
});
211211
});
212-
212+
213213
await expect(eventUpdatedAtResolver(mockEvent, {}, ctx)).rejects.toThrow(
214214
expect.objectContaining({
215215
message: "Unauthorized action", // Ensure the message is checked
216216
extensions: { code: "unauthorized_action" },
217-
})
217+
}),
218218
);
219219
});
220-
221220
});
222221
});

0 commit comments

Comments
 (0)