Home
last modified time | relevance | path

Searched refs:dnsPromises (Results 1 – 25 of 28) sorted by relevance

12

/third_party/node/test/parallel/
Dtest-dns-promises-exists.js5 const dnsPromises = require('dns/promises'); constant
8 assert.strictEqual(dnsPromises, dns.promises);
10 assert.strictEqual(dnsPromises.NODATA, dns.NODATA);
11 assert.strictEqual(dnsPromises.FORMERR, dns.FORMERR);
12 assert.strictEqual(dnsPromises.SERVFAIL, dns.SERVFAIL);
13 assert.strictEqual(dnsPromises.NOTFOUND, dns.NOTFOUND);
14 assert.strictEqual(dnsPromises.NOTIMP, dns.NOTIMP);
15 assert.strictEqual(dnsPromises.REFUSED, dns.REFUSED);
16 assert.strictEqual(dnsPromises.BADQUERY, dns.BADQUERY);
17 assert.strictEqual(dnsPromises.BADNAME, dns.BADNAME);
[all …]
Dtest-dns-lookup-promises.js13 const dnsPromises = require('dns').promises; constant
37 factory: () => dnsPromises.lookup('example.com'),
42 factory: () => dnsPromises.lookup('example.com'),
47 factory: () => dnsPromises.lookup('example.com'),
52 factory: () => dnsPromises.lookup('example.com'),
57 factory: () => dnsPromises.lookup('example.com', { family: 6 }),
73 return assert.rejects(dnsPromises.lookup('example.com'), expected);
80 factory: () => dnsPromises.lookup('example', { all: true }),
88 factory: () => dnsPromises.lookup('example', { all: true, family: 4 }),
96 factory: () => dnsPromises.lookup('example', { all: true }),
[all …]
Dtest-dns.js28 const dnsPromises = dns.promises; constant
153 dnsPromises.resolve('example.com', []);
164 dnsPromises.resolve();
187 assert.throws(() => dnsPromises.lookup({}), errorReg);
188 assert.throws(() => dnsPromises.lookup([]), errorReg);
189 assert.throws(() => dnsPromises.lookup(true), errorReg);
190 assert.throws(() => dnsPromises.lookup(1), errorReg);
191 assert.throws(() => dnsPromises.lookup(common.mustNotCall()), errorReg);
203 const res = await dnsPromises.lookup(value);
225 dnsPromises.lookup('nodejs.org', { hints });
[all …]
Dtest-dns-lookup.js13 const dnsPromises = dns.promises; constant
23 assert.throws(() => dnsPromises.lookup(1, {}), err);
65 assert.throws(() => { dnsPromises.lookup(false, options); }, err);
84 assert.throws(() => { dnsPromises.lookup(false, options); }, err);
94 assert.throws(() => { dnsPromises.lookup(false, options); }, err);
101 assert.throws(() => { dnsPromises.lookup(false, family); }, err);
106 assert.throws(() => dnsPromises.lookup(false, () => {}),
112 assert.throws(() => { dnsPromises.lookup(false, options); }, err);
121 assert.throws(() => { dnsPromises.lookup(false, options); }, err);
130 assert.throws(() => { dnsPromises.lookup(false, options); }, err);
[all …]
Dtest-dns-set-default-order.js20 const dnsPromises = dns.promises; constant
57 await allowFailed(dnsPromises.lookup('example.org'));
61 await allowFailed(dnsPromises.lookup('example.org', {}));
67 await allowFailed(dnsPromises.lookup('example.org'));
71 await allowFailed(dnsPromises.lookup('example.org', {}));
77 await allowFailed(dnsPromises.lookup('example.org'));
81 await allowFailed(dnsPromises.lookup('example.org', {}));
87 await allowFailed(dnsPromises.lookup('example.org'));
91 await allowFailed(dnsPromises.lookup('example.org', {}));
Dtest-dns-lookup-promises-options-deprecated.js12 const dnsPromises = require('dns/promises'); constant
21 dnsPromises.lookup('127.0.0.1', { hints: '-1' });
26 assert.throws(() => dnsPromises.lookup('127.0.0.1', { hints: -1 }),
28 assert.throws(() => dnsPromises.lookup('127.0.0.1', { family: '6' }),
30 assert.throws(() => dnsPromises.lookup('127.0.0.1', { all: 'true' }),
32 assert.throws(() => dnsPromises.lookup('127.0.0.1', { verbatim: 'true' }),
34 assert.throws(() => dnsPromises.lookup('127.0.0.1', '6'),
Dtest-c-ares.js27 const dnsPromises = dns.promises; constant
32 res = await dnsPromises.lookup(null);
36 res = await dnsPromises.lookup('127.0.0.1');
40 res = await dnsPromises.lookup('::1');
78 assert.throws(() => dnsPromises.resolve('www.google.com', val), err);
91 assert.ok(Array.isArray(await dnsPromises.reverse('127.0.0.1')));
Dtest-dns-lookupService-promises.js6 const dnsPromises = require('dns').promises; constant
8 dnsPromises.lookupService('127.0.0.1', 22).then(common.mustCall((result) => {
17 () => dnsPromises.lookupService('192.0.2.1', 22),
Dtest-dns-default-verbatim-true.js19 const dnsPromises = dns.promises; constant
43 await allowFailed(dnsPromises.lookup('example.org'));
49 await allowFailed(dnsPromises.lookup('example.org', {}));
Dtest-dns-default-verbatim-false.js19 const dnsPromises = dns.promises; constant
43 await allowFailed(dnsPromises.lookup('example.org'));
49 await allowFailed(dnsPromises.lookup('example.org', {}));
Dtest-dns-setservers-type-check.js7 const dnsPromises = dns.promises; constant
38 dnsPromises.setServers(val);
78 dnsPromises.setServers(val);
Dtest-dns-resolve-promises.js8 const dnsPromises = require('dns').promises; constant
14 dnsPromises.resolve('example.org'),
Dtest-dns-resolvens-typeerror.js31 const dnsPromises = dns.promises; constant
34 () => dnsPromises.resolveNs([]), // bad name
Dtest-dns-channel-cancel-promise.js3 const { promises: dnsPromises } = require('dns');
8 const resolver = new dnsPromises.Resolver();
Dtest-dns-resolveany-bad-ancount.js7 const dnsPromises = dns.promises; constant
11 const resolverPromises = new dnsPromises.Resolver({ timeout: 100, tries: 1 });
Dtest-dns-resolveany.js7 const dnsPromises = dns.promises; constant
51 validateResults(await dnsPromises.resolveAny('example.org'));
/third_party/node/test/internet/
Dtest-dns.js34 const dnsPromises = dns.promises; constant
73 dnsPromises.reverse('bogus ip')
99 validateResult(await dnsPromises.resolve4(addresses.INET4_HOST, {
127 validateResult(await dnsPromises.resolve6(addresses.INET6_HOST, {
154 validateResult(await dnsPromises.resolveMx(addresses.MX_HOST));
166 dnsPromises.resolveMx(addresses.NOT_FOUND)
194 validateResult(await dnsPromises.resolveNs(addresses.NS_HOST));
206 dnsPromises.resolveNs(addresses.NOT_FOUND)
238 validateResult(await dnsPromises.resolveSrv(addresses.SRV_HOST));
250 dnsPromises.resolveSrv(addresses.NOT_FOUND)
[all …]
Dtest-dns-ipv4.js12 const dnsPromises = dns.promises; constant
51 validateResult(await dnsPromises.resolve4(addresses.INET4_HOST));
73 validateResult(await dnsPromises.reverse(addresses.INET4_IP));
91 validateResult(await dnsPromises.lookup(addresses.INET4_HOST, 4));
109 validateResult(await dnsPromises.lookup(addresses.INET4_HOST));
127 validateResult(await dnsPromises.lookup(addresses.INET4_HOST, { family: 4 }));
145 validateResult(await dnsPromises.lookup(addresses.INET4_HOST, {
165 validateResult(await dnsPromises.lookup('127.0.0.1'));
182 validateResult(await dnsPromises.lookup('localhost', 4));
204 validateResult(await dnsPromises.lookup(addresses.INET4_HOST, {
[all …]
Dtest-dns-promises-resolve.js5 const dnsPromises = require('dns').promises; constant
11 () => dnsPromises.resolve('example.org', rrtype),
24 () => dnsPromises.resolve('example.org', rrtype),
38 const result = await dnsPromises.resolve('example.org', rrtype);
Dtest-dns-ipv6.js10 const dnsPromises = dns.promises; constant
51 validateResult(await dnsPromises.resolve6(addresses.INET6_HOST));
72 validateResult(await dnsPromises.reverse(addresses.INET6_IP));
90 validateResult(await dnsPromises.lookup(addresses.INET6_HOST, 6));
122 validateResult(await dnsPromises.lookup(addresses.INET6_HOST, { family: 6 }));
168 validateResult(await dnsPromises.lookup('::1'));
192 validateResult(await dnsPromises.lookup(addresses.INET6_HOST, {
Dtest-dns-lookup.js6 const dnsPromises = dns.promises; constant
11 dnsPromises.lookup(addresses.NOT_FOUND, {
23 dnsPromises.lookup(addresses.NOT_FOUND, {
49 () => dnsPromises.lookup(addresses.NOT_FOUND, {
Dtest-dns-any.js12 const dnsPromises = dns.promises; constant
125 validateResult(await dnsPromises.resolve('sip2sip.info', 'ANY'));
144 validateResult(await dnsPromises.resolve('_caldav._tcp.google.com', 'ANY'));
163 validateResult(await dnsPromises.resolve('8.8.8.8.in-addr.arpa', 'ANY'));
Dtest-dns-txt-sigsegv.js5 const dnsPromises = dns.promises; constant
8 const result = await dnsPromises.resolveTxt('www.microsoft.com');
/third_party/node/doc/api/
Ddns.md785 [`dnsPromises.lookup()`][]. The value could be:
802 [`dnsPromises.lookup()`][]. The value could be:
863 ### Class: `dnsPromises.Resolver`
873 [`resolver.setServers()`][`dnsPromises.setServers()`] does not affect
892 The following methods from the `dnsPromises` API are available:
894 * [`resolver.getServers()`][`dnsPromises.getServers()`]
895 * [`resolver.resolve()`][`dnsPromises.resolve()`]
896 * [`resolver.resolve4()`][`dnsPromises.resolve4()`]
897 * [`resolver.resolve6()`][`dnsPromises.resolve6()`]
898 * [`resolver.resolveAny()`][`dnsPromises.resolveAny()`]
[all …]
Ddeprecations.md2952 ### DEP0153: `dns.lookup` and `dnsPromises.lookup` options type coercion
2972 [`dns.lookup()`][] and [`dnsPromises.lookup()`][] throws an
3398 [`dnsPromises.lookup()`]: dns.md#dnspromiseslookuphostname-options

12