add tests for isNotificationScheduled

This commit is contained in:
2025-03-31 20:29:44 -07:00
parent 50148cc2f4
commit c6f846d109

View File

@@ -181,5 +181,18 @@ describe.each(repositoryImplementations)('$name', (holder) => {
}; };
expect(mockCallback).toHaveBeenCalledWith(expectedEvent); 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);
}) })
}); });
});