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 <noreply@anthropic.com>
This commit is contained in:
Chris Parsons 2026-03-17 11:13:55 -07:00
parent db49c83999
commit 0f43248a3d

View file

@ -46,6 +46,7 @@ function makeDb(existingResult?: { id: string; isPartialScore: boolean }) {
seasonSports: { seasonSports: {
findMany: vi.fn().mockResolvedValue([]), // empty → standings loop exits immediately findMany: vi.fn().mockResolvedValue([]), // empty → standings loop exits immediately
}, },
sportsSeasons: { findFirst: vi.fn().mockResolvedValue(null) },
scoringEvents: { findFirst: vi.fn().mockResolvedValue(null) }, scoringEvents: { findFirst: vi.fn().mockResolvedValue(null) },
}, },
} as any, } as any,