From acdd93cd9cc0088a199ff220892b84da9bb325b1 Mon Sep 17 00:00:00 2001 From: Bersabel Tadesse Date: Fri, 21 Aug 2026 01:28:29 -0700 Subject: [PATCH] Stabilize GitHub activity migration cutoff test --- plugins/github-notifications/server.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/github-notifications/server.test.ts b/plugins/github-notifications/server.test.ts index 4992ae2..65573e5 100644 --- a/plugins/github-notifications/server.test.ts +++ b/plugins/github-notifications/server.test.ts @@ -506,6 +506,8 @@ describe("GitHub Activity plugin", () => { }); it("does not resolve activity created after a legacy migration cutoff", async () => { + vi.useFakeTimers({ toFake: ["Date"] }); + vi.setSystemTime(new Date("2026-08-20T10:00:00Z")); let includeActivity = false; const createdAfterMigration = "2026-08-20T11:00:00Z"; const runGh = vi.fn(async (args) => { @@ -560,6 +562,7 @@ describe("GitHub Activity plugin", () => { await harness.behavior.callRpc("listNotifications", { force: false }); includeActivity = true; + vi.setSystemTime(new Date("2026-08-20T12:00:00Z")); const refreshed = (await harness.behavior.callRpc("listNotifications", { force: true, })) as NotificationsPayload;