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.
28 lines
521 B
28 lines
521 B
10 years ago
|
'use strict';
|
||
9 years ago
|
require('../common');
|
||
10 years ago
|
var assert = require('assert');
|
||
|
var dns = require('dns');
|
||
|
var domain = require('domain');
|
||
|
|
||
|
var methods = [
|
||
|
'resolve4',
|
||
|
'resolve6',
|
||
|
'resolveCname',
|
||
|
'resolveMx',
|
||
|
'resolveNs',
|
||
|
'resolveTxt',
|
||
|
'resolveSrv',
|
||
9 years ago
|
'resolvePtr',
|
||
10 years ago
|
'resolveNaptr',
|
||
|
'resolveSoa'
|
||
10 years ago
|
];
|
||
10 years ago
|
|
||
|
methods.forEach(function(method) {
|
||
|
var d = domain.create();
|
||
|
d.run(function() {
|
||
|
dns[method]('google.com', function() {
|
||
10 years ago
|
assert.strictEqual(process.domain, d, method + ' retains domain');
|
||
10 years ago
|
});
|
||
|
});
|
||
|
});
|