Skip to content

Commit 385fd01

Browse files
committed
test: allow numeric string for lookupService test
Fixes: #42164 If the given port number isn't associated with any service name, the `service` resolved from `dns.lookupService` can be a numeric string representing the port number.
1 parent df20947 commit 385fd01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-dns-lookupService-promises.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const assert = require('assert');
66
const dnsPromises = require('dns').promises;
77

88
dnsPromises.lookupService('127.0.0.1', 22).then(common.mustCall((result) => {
9-
assert.strictEqual(result.service, 'ssh');
9+
assert(['ssh', '22'].some((x) => x === result.service));
1010
assert.strictEqual(typeof result.hostname, 'string');
1111
assert.notStrictEqual(result.hostname.length, 0);
1212
}));

0 commit comments

Comments
 (0)