Skip to content

Commit

Permalink
test: fix failing integration tests on node@18
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Apr 25, 2022
1 parent 0bb8b56 commit df7dbb8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,8 @@ export function defineIntegrationTestSuiteApolloServerTests(
const { family, address, port } =
this.server.address() as AddressInfo;

if (family !== 'IPv4') {
// @ts-expect-error until https://github.com/DefinitelyTyped/DefinitelyTyped/pull/60042
if (family !== 'IPv4' && family !== 4) {
throw new Error(`The family was unexpectedly ${family}.`);
}
return new URL(`http://${address}:${port}`).toString();
Expand Down Expand Up @@ -1959,7 +1960,8 @@ export function defineIntegrationTestSuiteApolloServerTests(

const { family, address, port } =
fakeUsageReportingServer.address() as AddressInfo;
if (family !== 'IPv4') {
// @ts-expect-error until https://github.com/DefinitelyTyped/DefinitelyTyped/pull/60042
if (family !== 'IPv4' && family !== 4) {
throw new Error(`The family was unexpectedly ${family}.`);
}

Expand Down

0 comments on commit df7dbb8

Please sign in to comment.