mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
update test to account for multiple shuttle IDs in data
This commit is contained in:
@@ -46,6 +46,12 @@ describe("getEtaForShuttleAndStopId", () => {
|
|||||||
shuttleId: "5577",
|
shuttleId: "5577",
|
||||||
stopId: "177666",
|
stopId: "177666",
|
||||||
millisecondsSinceEpoch: Date.now(),
|
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?.secondsRemaining).toEqual(587);
|
||||||
expect(result?.millisecondsSinceEpoch).toBeDefined();
|
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 () => {
|
test("getEtaForShuttleAndStopId returns null if API call is invalid and cache is empty", async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user