mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
521 B
27 lines
521 B
'use strict';
|
|
require('../common');
|
|
var assert = require('assert');
|
|
var dns = require('dns');
|
|
var domain = require('domain');
|
|
|
|
var methods = [
|
|
'resolve4',
|
|
'resolve6',
|
|
'resolveCname',
|
|
'resolveMx',
|
|
'resolveNs',
|
|
'resolveTxt',
|
|
'resolveSrv',
|
|
'resolvePtr',
|
|
'resolveNaptr',
|
|
'resolveSoa'
|
|
];
|
|
|
|
methods.forEach(function(method) {
|
|
var d = domain.create();
|
|
d.run(function() {
|
|
dns[method]('google.com', function() {
|
|
assert.strictEqual(process.domain, d, method + ' retains domain');
|
|
});
|
|
});
|
|
});
|
|
|