mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
add test cases
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user