From 871f3b91797f11e76e12261be7a82daba01985a9 Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Wed, 22 Jan 2025 15:43:21 -0800 Subject: [PATCH] rename shuttle data fetch snapshot --- .../fetchShuttleDataSuccessfulResponse.ts} | 2 +- test/loaders/temp.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) rename test/jsonSnapshots/{genericShuttleDataBySystemId.ts => fetchShuttleData/fetchShuttleDataSuccessfulResponse.ts} (98%) diff --git a/test/jsonSnapshots/genericShuttleDataBySystemId.ts b/test/jsonSnapshots/fetchShuttleData/fetchShuttleDataSuccessfulResponse.ts similarity index 98% rename from test/jsonSnapshots/genericShuttleDataBySystemId.ts rename to test/jsonSnapshots/fetchShuttleData/fetchShuttleDataSuccessfulResponse.ts index 04edca6..877ab2d 100644 --- a/test/jsonSnapshots/genericShuttleDataBySystemId.ts +++ b/test/jsonSnapshots/fetchShuttleData/fetchShuttleDataSuccessfulResponse.ts @@ -1,5 +1,5 @@ // Snapshot taken from the Passio GO! API -export const genericShuttleDataBySystemId = { +export const fetchShuttleDataSuccessfulResponse = { "alertCRC": "23c1b91c", "buses": { "402840": [ diff --git a/test/loaders/temp.ts b/test/loaders/temp.ts index 3248494..160b490 100644 --- a/test/loaders/temp.ts +++ b/test/loaders/temp.ts @@ -6,7 +6,7 @@ import { } from "../../src/repositories/ApiBasedRepository"; import { IEta, IShuttle, IStop } from "../../src/entities/entities"; import { genericEtaDataByStopId } from "../jsonSnapshots/genericEtaDataBySystemId"; -import { genericShuttleDataBySystemId } from "../jsonSnapshots/genericShuttleDataBySystemId"; +import { fetchShuttleDataSuccessfulResponse } from "../jsonSnapshots/fetchShuttleData/fetchShuttleDataSuccessfulResponse"; /** * Update the global fetch function to return a specific object. @@ -290,7 +290,7 @@ describe("updateEtasForSystemIfTTL", () => { describe("getShuttleById", () => { test("getShuttleById returns null if unseeded cache", async () => { - updateGlobalFetchMockJson(genericShuttleDataBySystemId); + updateGlobalFetchMockJson(fetchShuttleDataSuccessfulResponse); const initialCache: ApiBasedRepositoryCache = {}; const repository = new ApiBasedRepository(initialCache); @@ -300,7 +300,7 @@ describe("getShuttleById", () => { }); test("getShuttleById returns data if present", async () => { - updateGlobalFetchMockJson(genericShuttleDataBySystemId); + updateGlobalFetchMockJson(fetchShuttleDataSuccessfulResponse); const initialCacheShuttle = { coordinates: {