mirror of
https://github.com/nodejs/node.git
synced 2024-11-30 07:27:22 +01:00
3401cad980
var -> let/const .equal -> .strictEqual PR-URL: https://github.com/nodejs/node/pull/9913 Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
15 lines
375 B
JavaScript
15 lines
375 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, 'ECONNREFUSED');
|
|
assert.strictEqual(e.port, common.PORT);
|
|
assert.strictEqual(e.address, '127.0.0.1');
|
|
}));
|