diff --git a/test/parallel/test-net-autoselectfamily-commandline-option.js b/test/parallel/test-net-autoselectfamily-commandline-option.js index 5687d31b2eec42..346f95011c5952 100644 --- a/test/parallel/test-net-autoselectfamily-commandline-option.js +++ b/test/parallel/test-net-autoselectfamily-commandline-option.js @@ -85,6 +85,10 @@ function createDnsServer(ipv6Addr, ipv4Addr, cb) { if (common.hasIPv6) { assert.strictEqual(error.code, 'ECONNREFUSED'); assert.strictEqual(error.message, `connect ECONNREFUSED ::1:${port}`); + } else if (common.isIBMi) { + // IBMi returns EUNATCH (ERRNO 42) when IPv6 is disabled + // keep this errno assertion until EUNATCH is recognized by libuv + assert.strictEqual(error.errno, -42); } else { assert.strictEqual(error.code, 'EADDRNOTAVAIL'); assert.strictEqual(error.message, `connect EADDRNOTAVAIL ::1:${port} - Local (:::0)`);