mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-19 08:50:29 +00:00
Reorganize self-updating repository tests based on method name
This commit is contained in:
@@ -73,7 +73,7 @@ describe.each(repositoryImplementations)('$name', (holder) => {
|
|||||||
return await setupRouteAndOrderedStopsForShuttleRepository(shuttleRepository);
|
return await setupRouteAndOrderedStopsForShuttleRepository(shuttleRepository);
|
||||||
}
|
}
|
||||||
|
|
||||||
describe("addOrUpdateShuttle triggers ETA calculations", () => {
|
describe("handleShuttleWillArriveAtStop", () => {
|
||||||
test("updates how long the shuttle took to get from one stop to another", async () => {
|
test("updates how long the shuttle took to get from one stop to another", async () => {
|
||||||
const { route, systemId, stop2, stop1 } = await setupRouteAndOrderedStops();
|
const { route, systemId, stop2, stop1 } = await setupRouteAndOrderedStops();
|
||||||
|
|
||||||
@@ -109,7 +109,9 @@ describe.each(repositoryImplementations)('$name', (holder) => {
|
|||||||
});
|
});
|
||||||
expect(travelTime).toEqual(15 * 60);
|
expect(travelTime).toEqual(15 * 60);
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("handleShuttleUpdate", () =>{
|
||||||
test("adds an ETA entry based on historical data", async () => {
|
test("adds an ETA entry based on historical data", async () => {
|
||||||
const { route, systemId, stop1, stop2 } = await setupRouteAndOrderedStops();
|
const { route, systemId, stop1, stop2 } = await setupRouteAndOrderedStops();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user