Skip to content

Commit

Permalink
test: Change var to const, assert.equal to assert.strictEqual in net
Browse files Browse the repository at this point in the history
  • Loading branch information
troy0820 committed Dec 1, 2016
1 parent 8264a22 commit 081cdc0
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions test/parallel/test-net-better-error-messages-port.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
'use strict';
var common = require('../common');
var net = require('net');
var assert = require('assert');

var c = net.createConnection(common.PORT);
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.equal(e.code, 'ECONNREFUSED');
assert.equal(e.port, common.PORT);
assert.equal(e.address, '127.0.0.1');
assert.strictEqual(e.code, 'ECONNREFUSED');
assert.strictEqual(e.port, common.PORT);
assert.strictEqual(e.address, '127.0.0.1');
}));

0 comments on commit 081cdc0

Please sign in to comment.