add test cases

This commit is contained in:
2025-01-23 15:49:43 -08:00
parent 6e05ac5fad
commit c09195804a

View File

@@ -1,4 +1,4 @@
import { beforeEach, describe } from "@jest/globals";
import { beforeEach, describe, it } from "@jest/globals";
import { ApolloServer } from "@apollo/server";
import { UnoptimizedInMemoryRepository } from "../../src/repositories/UnoptimizedInMemoryRepository";
import { ServerContext } from "../../src/ServerContext";
@@ -28,6 +28,18 @@ describe("OrderedStopResolvers", () => {
}
}
`;
it("returns the next stop if it exists", async () => {
});
it("returns null if there is no next stop in the repository", async () => {
});
it("returns null if the current stop no longer exists", async () => {
});
});
describe("previousStop", () => {
@@ -45,6 +57,18 @@ describe("OrderedStopResolvers", () => {
}
}
`;
it("returns the previous stop if it exists", async () => {
});
it("returns null if there is no previous stop in the repository", async () => {
});
it("returns null if the current stop no longer exists", async () => {
});
});
describe("route", () => {
@@ -66,6 +90,14 @@ describe("OrderedStopResolvers", () => {
`;
});
it("returns the associated route if it exists", async () => {
});
it("returns null if the route doesn't exist", async () => {
});
describe("stop", () => {
const query = `
query GetNextStop($systemId: ID!, $routeId: ID!, $stopId: ID!) {
@@ -81,6 +113,14 @@ describe("OrderedStopResolvers", () => {
}
}
`;
it("returns the associated stop if it exists", async () => {
});
it("returns null if the stop doesn't exist", async () => {
});
});
});