From ba04e1b24a7eb42ce645fa6fd38793b1ee68eff5 Mon Sep 17 00:00:00 2001 From: Chris Parsons Date: Thu, 16 Apr 2026 11:11:41 -0700 Subject: [PATCH] Fix non-null assertion lint errors in test assertions --- app/models/__tests__/upcoming-calendar.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 () => {