diff --git a/app/models/__tests__/upcoming-calendar.test.ts b/app/models/__tests__/upcoming-calendar.test.ts index e6c970c..b8212fa 100644 --- a/app/models/__tests__/upcoming-calendar.test.ts +++ b/app/models/__tests__/upcoming-calendar.test.ts @@ -573,10 +573,10 @@ describe("getUpcomingEventsForDraftedParticipants — bracket misc", () => { // The DB mock returns rows only for matches the WHERE clause matches. // When a match is complete (isComplete=true) the DB should return no rows. // Simulate this by returning an empty result set. + // No second mockReturnValueOnce is needed: empty rows means eventIdsFromRows + // is empty so the max-game-number lookup is never called. const chain = makeSelectChain([]); - mockDb.selectDistinct - .mockReturnValueOnce(chain) - .mockReturnValueOnce(makeMaxGameChain([])); + mockDb.selectDistinct.mockReturnValueOnce(chain); const result = await getUpcomingEventsForDraftedParticipants( SPORTS_SEASON_ID, "playoff_bracket",