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.
This commit is contained in:
Maurice
2026-08-29 00:48:17 +02:00
committed by Maurice
parent d6955f20a6
commit f1eadd670d
@@ -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] }
}