From 103757865a520984cf9ead3684baa5766baf3d2a Mon Sep 17 00:00:00 2001 From: Livia Medeiros Date: Fri, 28 Jul 2023 15:35:18 +0900 Subject: [PATCH] test: fix `autoselectfamily` on platforms without IPv6 support (#2197) --- test/autoselectfamily.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/autoselectfamily.js b/test/autoselectfamily.js index aa9a751365a..0b44a3eb887 100644 --- a/test/autoselectfamily.js +++ b/test/autoselectfamily.js @@ -164,7 +164,7 @@ test('with autoSelectFamily disabled the request fails when using request', (t) method: 'GET', dispatcher: agent }, (err, { statusCode, body }) => { - t.strictSame(err.code, 'ECONNREFUSED') + t.ok(['ECONNREFUSED', 'EAFNOSUPPORT'].includes(err.code)) }) }) }) @@ -191,7 +191,7 @@ test('with autoSelectFamily disabled the request fails when using a client', (t) path: '/', method: 'GET' }, (err, { statusCode, body }) => { - t.strictSame(err.code, 'ECONNREFUSED') + t.ok(['ECONNREFUSED', 'EAFNOSUPPORT'].includes(err.code)) }) }) })