From c6f846d1099c4e7e5873e146fb7fbc83179a24b3 Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Mon, 31 Mar 2025 20:29:44 -0700 Subject: [PATCH] add tests for isNotificationScheduled --- .../NotificationRepositorySharedTests.test.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/test/repositories/NotificationRepositorySharedTests.test.ts b/test/repositories/NotificationRepositorySharedTests.test.ts index 6205833..6c7587f 100644 --- a/test/repositories/NotificationRepositorySharedTests.test.ts +++ b/test/repositories/NotificationRepositorySharedTests.test.ts @@ -181,5 +181,18 @@ describe.each(repositoryImplementations)('$name', (holder) => { }; expect(mockCallback).toHaveBeenCalledWith(expectedEvent); }); - }) + }); + + describe("isNotificationScheduled", () => { + it("returns true if the notification is in the repo", async () => { + await repo.addOrUpdateNotification(notification); + const result = await repo.isNotificationScheduled(notification); + expect(result).toBe(true); + }); + + it("returns false if the notification isn't in the repo", async () => { + const result = await repo.isNotificationScheduled(notification); + expect(result).toBe(false); + }) + }); });