From d03a99ee06aa8d3d86ea63b7c069ca375a07baa2 Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Tue, 28 Jan 2025 15:30:54 -0800 Subject: [PATCH] add test cases for eta resolver tests --- test/resolvers/EtaResolverTests.test.ts | 55 +++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 test/resolvers/EtaResolverTests.test.ts diff --git a/test/resolvers/EtaResolverTests.test.ts b/test/resolvers/EtaResolverTests.test.ts new file mode 100644 index 0000000..440da68 --- /dev/null +++ b/test/resolvers/EtaResolverTests.test.ts @@ -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; + 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 () => { + + }); + }); +}); \ No newline at end of file