Skip to content

Commit 29a2a7f

Browse files
committed
test: fix failing integration tests on node@18
Context: nodejs/node#41431 (comment)
1 parent 0bb8b56 commit 29a2a7f

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ workflows:
8787
- "14"
8888
- "16"
8989
- "17"
90+
- "18"
9091
- "Check for FIXM\x45"
9192
- Prettier
9293
- Spell check

packages/server/src/__tests__/integration/apolloServerTests.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,8 @@ export function defineIntegrationTestSuiteApolloServerTests(
934934
const { family, address, port } =
935935
this.server.address() as AddressInfo;
936936

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

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

0 commit comments

Comments
 (0)