Created
August 4, 2024 20:14
-
-
Save colinfwren/4a1977130a99c5e91569e75015cbcde0 to your computer and use it in GitHub Desktop.
Setting up and tearing down Apollo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('a feature of the app', () => { | |
let server, url | |
beforeAll(async () => { | |
// assigns the values returned to the variables in the upper scope | |
({ server, url } = await createApolloServer({ port: 0 })) | |
}) | |
afterAll(async () => { | |
await server?.stop() | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment