Skip to content

Commit 6cd417c

Browse files
test: fix failing integration tests on node@18 (#6350)
Context: nodejs/node#41431 (comment)
1 parent baaac91 commit 6cd417c

4 files changed

Lines changed: 11 additions & 9 deletions

File tree

‎.circleci/config.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ workflows:
8686
node-version:
8787
- "14"
8888
- "16"
89-
- "17"
89+
- "18"
9090
- "Check for FIXM\x45"
9191
- Prettier
9292
- Spell check

‎package-lock.json‎

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/server/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
},
2727
"dependencies": {
2828
"@apollo/usage-reporting-protobuf": "^3.3.0",
29-
"@apollo/utils.createhash": "^1.0.0",
30-
"@apollo/utils.isnodelike": "^1.0.0",
29+
"@apollo/utils.createhash": "^1.1.0",
30+
"@apollo/utils.isnodelike": "^1.1.0",
3131
"@apollo/utils.logger": "^1.0.0",
3232
"@apollo/utils.fetcher": "^1.0.0",
3333
"@apollographql/graphql-playground-html": "1.6.29",

‎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)