Skip to content

Instantly share code, notes, and snippets.

@misterdjules
Created July 31, 2014 16:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save misterdjules/a06d55d2eb3e3fe74fa7 to your computer and use it in GitHub Desktop.
Save misterdjules/a06d55d2eb3e3fe74fa7 to your computer and use it in GitHub Desktop.
Example of dns.lookupService test
TEST(function test_lookupservice_ip_ipv4(done) {
var req = dns.lookupService('127.0.0.1', 80, function(err, host, service) {
if (err) throw err;
assert.strictEqual(host, 'localhost');
assert.strictEqual(service, 'http');
done();
});
checkWrap(req);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment