diff --git a/app/models/__tests__/upcoming-calendar.test.ts b/app/models/__tests__/upcoming-calendar.test.ts index 5439348..609ea7a 100644 --- a/app/models/__tests__/upcoming-calendar.test.ts +++ b/app/models/__tests__/upcoming-calendar.test.ts @@ -259,8 +259,8 @@ describe("getUpcomingEventsForDraftedParticipants — bracket sports", () => { const arsenalEntry = result.find((r) => r.relevantParticipants.some((p) => p.id === "arsenal")); expect(manCityEntry).toBeDefined(); expect(arsenalEntry).toBeDefined(); - expect(manCityEntry!.relevantParticipants).toHaveLength(1); - expect(arsenalEntry!.relevantParticipants).toHaveLength(1); + expect(manCityEntry?.relevantParticipants).toHaveLength(1); + expect(arsenalEntry?.relevantParticipants).toHaveLength(1); }); it("only includes drafted participants in relevantParticipants, not opponents", async () => { @@ -512,10 +512,10 @@ describe("getUpcomingEventsForDraftedParticipants — bracket sports", () => { const higginsEntry = result.find((r) => r.relevantParticipants.some((p) => p.id === "john-higgins")); expect(williamsEntry).toBeDefined(); expect(higginsEntry).toBeDefined(); - expect(williamsEntry!.earliestGameTime).toBe(time1.toISOString()); - expect(higginsEntry!.earliestGameTime).toBe(time2.toISOString()); - expect(williamsEntry!.matchLabel).toBe("Round of 32"); - expect(higginsEntry!.matchLabel).toBe("Round of 32"); + expect(williamsEntry?.earliestGameTime).toBe(time1.toISOString()); + expect(higginsEntry?.earliestGameTime).toBe(time2.toISOString()); + expect(williamsEntry?.matchLabel).toBe("Round of 32"); + expect(higginsEntry?.matchLabel).toBe("Round of 32"); }); it("all-compete events have null earliestGameTime and matchLabel", async () => {