From 365031384cfa9bbaef13de17e8ac72cef2b256a7 Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Wed, 8 Jan 2025 17:23:36 -0800 Subject: [PATCH] stub getShuttleById in getEtasForShuttleId --- test/repositories/ApiBasedRepositoryTests.test.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/repositories/ApiBasedRepositoryTests.test.ts b/test/repositories/ApiBasedRepositoryTests.test.ts index 76ff1d2..17e800b 100644 --- a/test/repositories/ApiBasedRepositoryTests.test.ts +++ b/test/repositories/ApiBasedRepositoryTests.test.ts @@ -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