Skip to content

Commit

Permalink
test: update test-net-connect-handle-econnrefused
Browse files Browse the repository at this point in the history
* var -> const
* assert.equal() -> assert.strictEqual()
* assert.ok(false) -> common.fail()

PR-URL: #9932
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
itspun authored and Fishrock123 committed Dec 6, 2016
1 parent ba7d1cf commit 79b36e9
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions test/parallel/test-net-connect-handle-econnrefused.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
'use strict';
var common = require('../common');
var net = require('net');
var assert = require('assert');
const common = require('../common');
const net = require('net');
const assert = require('assert');


// Hopefully nothing is running on common.PORT
var c = net.createConnection(common.PORT);
const c = net.createConnection(common.PORT);

c.on('connect', function() {
console.error('connected?!');
assert.ok(false);
common.fail('connected?!');
});

c.on('error', common.mustCall(function(e) {
console.error('couldn\'t connect.');
assert.equal('ECONNREFUSED', e.code);
assert.strictEqual('ECONNREFUSED', e.code);
}));

0 comments on commit 79b36e9

Please sign in to comment.