Skip to content

Commit 797e941

Browse files
committed
test: fix test-net-autoselectfamily for kernel without IPv6 support
PR-URL: #45856 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it>
1 parent 1ac639a commit 797e941

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/parallel/test-net-happy-eyeballs.js

+2
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ if (common.hasIPv6) {
202202
if (common.hasIPv6) {
203203
assert.strictEqual(error.code, 'ECONNREFUSED');
204204
assert.strictEqual(error.message, `connect ECONNREFUSED ::1:${port}`);
205+
} else if (error.code === 'EAFNOSUPPORT') {
206+
assert.strictEqual(error.message, `connect EAFNOSUPPORT ::1:${port} - Local (undefined:undefined)`);
205207
} else {
206208
assert.strictEqual(error.code, 'EADDRNOTAVAIL');
207209
assert.strictEqual(error.message, `connect EADDRNOTAVAIL ::1:${port} - Local (:::0)`);

0 commit comments

Comments
 (0)