From f1eadd670d0ef8f00278986d80fbab034d9f03b8 Mon Sep 17 00:00:00 2001 From: Maurice Date: Sat, 29 Aug 2026 00:48:17 +0200 Subject: [PATCH] test(roadtrip): read the last mock call without Array#at The client's lib is ES2020, where Array#at does not exist. Local typecheck ran before the file was added and CI caught it. --- client/src/components/Roadtrip/useRoadtripCorridor.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/components/Roadtrip/useRoadtripCorridor.test.ts b/client/src/components/Roadtrip/useRoadtripCorridor.test.ts index 93e861cb7..2cc90c11e 100644 --- a/client/src/components/Roadtrip/useRoadtripCorridor.test.ts +++ b/client/src/components/Roadtrip/useRoadtripCorridor.test.ts @@ -48,7 +48,8 @@ const routes = (days: RoadtripDay[]): RoadtripRoutes => ({ /** What the corridor hook was handed on the last render. */ const lastCall = (): { line: LatLng[]; categories: string[]; widthKm: number } => { - const call = useCorridorPois.mock.calls.at(-1)! + const calls = useCorridorPois.mock.calls + const call = calls[calls.length - 1] return { line: call[0], categories: call[1], widthKm: call[2] } }