From 0f43248a3dfda82a04cf8a30fa923d8b628e968c Mon Sep 17 00:00:00 2001 From: Chris Parsons Date: Tue, 17 Mar 2026 11:13:55 -0700 Subject: [PATCH] Fix process-match-result tests: add sportsSeasons to db mock recalculateAffectedLeagues now queries sportsSeasons to get the sport name for Discord notifications; the test mock db needed the stub added. Co-Authored-By: Claude Sonnet 4.6 --- app/models/__tests__/process-match-result.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/__tests__/process-match-result.test.ts b/app/models/__tests__/process-match-result.test.ts index 0d19abf..42fcfac 100644 --- a/app/models/__tests__/process-match-result.test.ts +++ b/app/models/__tests__/process-match-result.test.ts @@ -46,6 +46,7 @@ function makeDb(existingResult?: { id: string; isPartialScore: boolean }) { seasonSports: { findMany: vi.fn().mockResolvedValue([]), // empty → standings loop exits immediately }, + sportsSeasons: { findFirst: vi.fn().mockResolvedValue(null) }, scoringEvents: { findFirst: vi.fn().mockResolvedValue(null) }, }, } as any,