mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
stub getShuttleById in getEtasForShuttleId
This commit is contained in:
@@ -328,6 +328,19 @@ describe("getEtasForShuttleId", () => {
|
|||||||
const repository = new ApiBasedRepository(initialCache, ttls);
|
const repository = new ApiBasedRepository(initialCache, ttls);
|
||||||
repository.updateEtasForSystemIfTTL = jest.fn(async () => {
|
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");
|
const result = await repository.getEtasForShuttleId("5577");
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|||||||
Reference in New Issue
Block a user