mirror of
https://github.com/nodejs/node.git
synced 2024-11-30 07:27:22 +01:00
f7f2102514
* var -> const * assert.equal -> assert.strictEqual PR-URL: https://github.com/nodejs/node/pull/9907 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
15 lines
374 B
JavaScript
15 lines
374 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const net = require('net');
|
|
const assert = require('assert');
|
|
|
|
const c = net.createConnection(common.PORT, '***');
|
|
|
|
c.on('connect', common.fail);
|
|
|
|
c.on('error', common.mustCall(function(e) {
|
|
assert.strictEqual(e.code, 'ENOTFOUND');
|
|
assert.strictEqual(e.port, common.PORT);
|
|
assert.strictEqual(e.hostname, '***');
|
|
}));
|