rename shuttle data fetch snapshot

This commit is contained in:
2025-01-22 15:43:21 -08:00
parent 1027927bd6
commit 871f3b9179
2 changed files with 4 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
// Snapshot taken from the Passio GO! API // Snapshot taken from the Passio GO! API
export const genericShuttleDataBySystemId = { export const fetchShuttleDataSuccessfulResponse = {
"alertCRC": "23c1b91c", "alertCRC": "23c1b91c",
"buses": { "buses": {
"402840": [ "402840": [

View File

@@ -6,7 +6,7 @@ import {
} from "../../src/repositories/ApiBasedRepository"; } from "../../src/repositories/ApiBasedRepository";
import { IEta, IShuttle, IStop } from "../../src/entities/entities"; import { IEta, IShuttle, IStop } from "../../src/entities/entities";
import { genericEtaDataByStopId } from "../jsonSnapshots/genericEtaDataBySystemId"; 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. * Update the global fetch function to return a specific object.
@@ -290,7 +290,7 @@ describe("updateEtasForSystemIfTTL", () => {
describe("getShuttleById", () => { describe("getShuttleById", () => {
test("getShuttleById returns null if unseeded cache", async () => { test("getShuttleById returns null if unseeded cache", async () => {
updateGlobalFetchMockJson(genericShuttleDataBySystemId); updateGlobalFetchMockJson(fetchShuttleDataSuccessfulResponse);
const initialCache: ApiBasedRepositoryCache = {}; const initialCache: ApiBasedRepositoryCache = {};
const repository = new ApiBasedRepository(initialCache); const repository = new ApiBasedRepository(initialCache);
@@ -300,7 +300,7 @@ describe("getShuttleById", () => {
}); });
test("getShuttleById returns data if present", async () => { test("getShuttleById returns data if present", async () => {
updateGlobalFetchMockJson(genericShuttleDataBySystemId); updateGlobalFetchMockJson(fetchShuttleDataSuccessfulResponse);
const initialCacheShuttle = { const initialCacheShuttle = {
coordinates: { coordinates: {