From e0820cd17b628454a9d5be1331a2e6cb9f9059b5 Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Sun, 2 Feb 2025 14:42:32 -0800 Subject: [PATCH] add test setup --- test/services/NotificationServiceTests.test.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test/services/NotificationServiceTests.test.ts b/test/services/NotificationServiceTests.test.ts index 741e155..0d25b1b 100644 --- a/test/services/NotificationServiceTests.test.ts +++ b/test/services/NotificationServiceTests.test.ts @@ -1,9 +1,18 @@ -import { describe, it } from "@jest/globals"; +import { beforeEach, describe, it } from "@jest/globals"; +import { NotificationService } from "../../src/services/NotificationService"; +import { UnoptimizedInMemoryRepository } from "../../src/repositories/UnoptimizedInMemoryRepository"; describe("NotificationService", () => { + let repository: UnoptimizedInMemoryRepository + let notificationService: NotificationService; + + beforeEach(() => { + repository = new UnoptimizedInMemoryRepository(); + notificationService = new NotificationService(repository); + }) + describe("reloadAPNsTokenIfTimePassed", () => { it("reloads the token if token hasn't been generated yet", async () => { - }); it("doesn't reload the token if last refreshed time is recent", async () => {