add test cases for eta resolver tests

This commit is contained in:
2025-01-28 15:30:54 -08:00
parent 96846cbd88
commit d03a99ee06

View File

@@ -0,0 +1,55 @@
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 () => {
});
});
});