From dfdad807ae3ca5c6f3a205488a515ad541405008 Mon Sep 17 00:00:00 2001 From: Nik Graf Date: Tue, 5 Apr 2022 21:38:59 +0200 Subject: [PATCH] use new get-port api --- .../03-tutorial/05-chapter-4-testing-your-api.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/010-getting-started/03-tutorial/05-chapter-4-testing-your-api.mdx b/docs/content/010-getting-started/03-tutorial/05-chapter-4-testing-your-api.mdx index c7ac4eb5..b70563f1 100644 --- a/docs/content/010-getting-started/03-tutorial/05-chapter-4-testing-your-api.mdx +++ b/docs/content/010-getting-started/03-tutorial/05-chapter-4-testing-your-api.mdx @@ -100,7 +100,7 @@ touch tests/__helpers.ts ```ts // tests/__helpers.ts // 1 import { ServerInfo } from "apollo-server"; -import getPort, { makeRange } from "get-port"; +import getPort, { portNumbers } from "get-port"; import { GraphQLClient } from "graphql-request"; import { server } from "../api/server"; @@ -132,7 +132,7 @@ function graphqlTestContext() { return { async before() { - const port = await getPort({ port: makeRange(4000, 6000) }); // 4 + const port = await getPort({ port: portNumbers(4000, 6000) }); // 4 serverInstance = await server.listen({ port }); // 5 return new GraphQLClient(`http://localhost:${port}`); // 6