From e22537d93de57656201b3e66118449f8ca368a2f Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Wed, 12 Feb 2025 19:52:20 -0800 Subject: [PATCH] add second test for false condition --- test/resolvers/QueryResolverTests.test.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/resolvers/QueryResolverTests.test.ts b/test/resolvers/QueryResolverTests.test.ts index f75d436..bb53d5b 100644 --- a/test/resolvers/QueryResolverTests.test.ts +++ b/test/resolvers/QueryResolverTests.test.ts @@ -134,7 +134,24 @@ describe("QueryResolvers", () => { }); it("returns false if the notification isn't scheduled", async () => { + // Act + const response = await holder.testServer.executeOperation({ + query, + variables: { + input: { + shuttleId: "1", + stopId: "1", + deviceId: "1", + }, + } + }, { + contextValue: context, + }); + // Assert + assert(response.body.kind === "single"); + expect(response.body.singleResult.errors).toBeUndefined(); + expect(response.body.singleResult.data?.isNotificationScheduled).toBe(false); }); }); });