From 8406bea660232afe4ab4dab5323f99d16780262e Mon Sep 17 00:00:00 2001 From: Luke Policinski Date: Fri, 14 Aug 2026 15:26:52 -0400 Subject: [PATCH] bug: fix failed tests --- test/awards.spec.ts | 1 + test/notifications.spec.ts | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/test/awards.spec.ts b/test/awards.spec.ts index 1320234e..bd942e81 100644 --- a/test/awards.spec.ts +++ b/test/awards.spec.ts @@ -745,6 +745,7 @@ describe("awards (SQL-driven)", () => { has: jest.fn().mockResolvedValue(false), } as never, postgres, + { notifyPlayers: jest.fn() } as never, ); controller = new AwardsController(service, { diff --git a/test/notifications.spec.ts b/test/notifications.spec.ts index 94fdface..dcbb1d1a 100644 --- a/test/notifications.spec.ts +++ b/test/notifications.spec.ts @@ -95,6 +95,8 @@ describe("notifications (SQL-driven)", () => { { get: () => ({ webDomain: "https://example.com" }) } as any, preferences(), pushNotifications() as any, + { add: jest.fn() } as any, + { add: jest.fn() } as any, ); const subscribed = async (steamId: string) => { @@ -279,7 +281,10 @@ describe("notifications (SQL-driven)", () => { const redisManager = { getConnection: () => ({ exists: async () => 0, - pipeline: () => ({ set: () => {}, exec: async () => [] }), + pipeline: () => ({ + set: () => {}, + exec: async (): Promise> => [], + }), subscribe: async () => 1, publish: async () => 1, on: () => {}, @@ -294,7 +299,11 @@ describe("notifications (SQL-driven)", () => { get: (key: string) => key === "app" ? { webDomain: "https://example.com" } - : { publicKey: undefined, privateKey: undefined, subject: "x" }, + : { + publicKey: undefined as string | undefined, + privateKey: undefined as string | undefined, + subject: "x", + }, } as any, redisManager as any, );