mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
dns: add dns/promises alias
PR-URL: https://github.com/nodejs/node/pull/32953 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
1 parent
7a094dc505
commit
039cd00a9a
6 files changed
+60
-1
No files matched your search
@@ -0,0 +1,14 @@
|
||||
// Flags: --expose-internals
|
||||
import '../common/index.mjs';
|
||||
import assert from 'assert';
|
||||
import { lookupService } from 'dns/promises';
|
||||
|
||||
const invalidAddress = 'fasdfdsaf';
|
||||
|
||||
assert.throws(() => {
|
||||
lookupService(invalidAddress, 0);
|
||||
}, {
|
||||
code: 'ERR_INVALID_OPT_VALUE',
|
||||
name: 'TypeError',
|
||||
message: `The value "${invalidAddress}" is invalid for option "address"`
|
||||
});
|
||||
Reference in new issue
Block a user