update test to account for multiple shuttle IDs in data

This commit is contained in:
2025-01-09 14:00:52 -08:00
parent 8cd6c71206
commit ceec9b7617

View File

@@ -46,6 +46,12 @@ describe("getEtaForShuttleAndStopId", () => {
shuttleId: "5577",
stopId: "177666",
millisecondsSinceEpoch: Date.now(),
},
{
secondsRemaining: 226,
shuttleId: "9909",
stopId: "177666",
millisecondsSinceEpoch: Date.now(),
}
],
},
@@ -74,6 +80,8 @@ describe("getEtaForShuttleAndStopId", () => {
expect(result?.secondsRemaining).toEqual(587);
expect(result?.millisecondsSinceEpoch).toBeDefined();
expect(result?.shuttleId).toEqual("5577");
expect(result?.stopId).toEqual("177666");
});
test("getEtaForShuttleAndStopId returns null if API call is invalid and cache is empty", async () => {