2015-05-19 19:00:06 +08:00
|
|
|
'use strict';
|
2020-07-14 23:45:39 +08:00
|
|
|
const common = require('../common');
|
2016-12-31 07:38:06 +08:00
|
|
|
const assert = require('assert');
|
|
|
|
const dns = require('dns');
|
2018-06-12 02:56:33 +08:00
|
|
|
const dnsPromises = dns.promises;
|
|
|
|
|
|
|
|
(async function() {
|
|
|
|
const result = await dnsPromises.resolveTxt('www.microsoft.com');
|
|
|
|
assert.strictEqual(result.length, 0);
|
2020-07-14 23:45:39 +08:00
|
|
|
})().then(common.mustCall());
|
2015-02-26 06:59:29 +08:00
|
|
|
|
|
|
|
dns.resolveTxt('www.microsoft.com', function(err, records) {
|
2017-01-08 23:36:25 +08:00
|
|
|
assert.strictEqual(err, null);
|
|
|
|
assert.strictEqual(records.length, 0);
|
2015-02-26 06:59:29 +08:00
|
|
|
});
|