stub getShuttleById in getEtasForShuttleId

This commit is contained in:
2025-01-08 17:23:36 -08:00
parent f53774bb2f
commit 365031384c

View File

@@ -328,6 +328,19 @@ describe("getEtasForShuttleId", () => {
const repository = new ApiBasedRepository(initialCache, ttls);
repository.updateEtasForSystemIfTTL = jest.fn(async () => {
});
repository.getShuttleById = jest.fn(async () => {
const shuttle: IShuttle = {
id: "5577",
name: "08",
coordinates: {
latitude: 33.7933406,
longitude: -117.8539321,
},
routeId: "53966",
systemId: "1",
};
return shuttle;
});
const result = await repository.getEtasForShuttleId("5577");
// @ts-ignore