mirror of
https://github.com/nodejs/node.git
synced 2025-05-06 20:08:02 +00:00

Use assert.strictEqual instead of assert.equal in tests, manually convert types where necessary. PR-URL: https://github.com/nodejs/node/pull/10698 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
20 lines
551 B
JavaScript
20 lines
551 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const net = require('net');
|
|
|
|
const server = net.createServer(function(client) {
|
|
client.end();
|
|
server.close();
|
|
});
|
|
|
|
server.listen(0, '127.0.0.1', common.mustCall(function() {
|
|
net.connect(this.address().port, 'localhost')
|
|
.on('lookup', common.mustCall(function(err, ip, type, host) {
|
|
assert.strictEqual(err, null);
|
|
assert.strictEqual(ip, '127.0.0.1');
|
|
assert.strictEqual(type, 4);
|
|
assert.strictEqual(host, 'localhost');
|
|
}));
|
|
}));
|