diff --git a/apps/api/test/sports.test.ts b/apps/api/test/sports.test.ts index ad7be37..22c69c3 100644 --- a/apps/api/test/sports.test.ts +++ b/apps/api/test/sports.test.ts @@ -308,6 +308,11 @@ const fakeSites = (state: { benfica: { shirtNumber: number; name: string; photos }, ]); if (u.pathname.includes("/calendar/")) return json([]); + // EHF club competitions: the season pages exist but list no matches yet. + if (u.host.endsWith(".eurohandball.com")) { + if (u.pathname.endsWith("/matches/")) return bytes(Buffer.from(`
`, "utf8")); + if (u.pathname.startsWith("/umbraco/api/competitionmatchesapi/")) return json({ matches: [], hasPastMatches: false, hasFutureMatches: false }); + } if (u.host === "www.ligaportugal.pt" && u.pathname.endsWith(".png")) return { ok: true, status: 200, json: async () => ({}), text: async () => "", arrayBuffer: async () => state.png.buffer.slice(state.png.byteOffset, state.png.byteOffset + state.png.byteLength) as ArrayBuffer }; return { ok: false, status: 404, json: async () => ({}), text: async () => "", arrayBuffer: async () => new ArrayBuffer(0) }; @@ -352,6 +357,12 @@ describe("sports data service", () => { expect(comps.map((c) => [c.provider, c.externalId, c.season])).toEqual([ ["LIGA", "allianzcup", "20262027"], ["FPA", "PO09", "20262027"], + ["EHF", "cl-men", "20262027"], + ["EHF", "cl-women", "20262027"], + ["EHF", "ec-men", "20262027"], + ["EHF", "ec-women", "20262027"], + ["EHF", "el-men", "20262027"], + ["EHF", "el-women", "20262027"], ["LIGA", "ligaportugalbetclic", "20262027"], ["LIGA", "ligaportugalmeusuper", "20262027"], ["UEFA", "1", "20262027"],