mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-19 08:50:29 +00:00
Add updated test cases and update call to stop arrival helper
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import { beforeEach, describe, it } from "@jest/globals";
|
||||
import { RedisShuttleRepository } from "../RedisShuttleRepository";
|
||||
import { afterEach } from "node:test";
|
||||
|
||||
describe("RedisShuttleRepository", () => {
|
||||
let repository: RedisShuttleRepository;
|
||||
|
||||
beforeEach(async () => {
|
||||
repository = new RedisShuttleRepository();
|
||||
await repository.connect();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await repository.clearAllData();
|
||||
await repository.disconnect();
|
||||
});
|
||||
|
||||
describe("getArrivedStopIfExists", () => {
|
||||
it("gets the stop that the shuttle is currently at, if exists", async () => {
|
||||
|
||||
});
|
||||
|
||||
it("returns undefined if shuttle is not currently at a stop", async () => {
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
describe("getShuttleLastStopArrival", () => {
|
||||
it("gets the shuttle's last stop if existing in the data", async () => {
|
||||
// Use updateShuttleLastStopArrival to populate data
|
||||
});
|
||||
|
||||
it("returns undefined if the data has never been initialized", async () => {
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user