Files
project-inter-server/test/resolvers/EtaResolverTests.test.ts

55 lines
1.3 KiB
TypeScript

import { beforeEach, describe, it } from "@jest/globals";
import { ApolloServer } from "@apollo/server";
import { UnoptimizedInMemoryRepository } from "../../src/repositories/UnoptimizedInMemoryRepository";
import { setUpTestServer } from "../testHelpers/apolloSetupHelpers";
import { ServerContext } from "../../src/ServerContext";
describe("EtaResolvers", () => {
let testServer: ApolloServer<ServerContext>;
let repository: UnoptimizedInMemoryRepository;
beforeEach(async () => {
testServer = setUpTestServer();
repository = new UnoptimizedInMemoryRepository();
});
describe("stop", () => {
const query = `
query GetETAStop($systemId: ID!, $shuttleId: ID!) {
system(id: $systemId) {
shuttle(id: $shuttleId) {
etas {
stop {
id
}
}
}
}
}
`;
it("returns the associated stop if it exists", async () => {
});
});
describe("shuttle", () => {
const query = `
query GetETAShuttle($systemId: ID!, $shuttleId: ID!) {
system(id: $systemId) {
shuttle(id: $shuttleId) {
etas {
shuttle {
id
}
}
}
}
}
`;
it("returns the associated shuttle if it exists", async () => {
});
});
});