Skip to content

Commit 093adca

Browse files
itspunaddaleax
authored andcommittedDec 8, 2016
test: update test-net-connect-handle-econnrefused
* var -> const * assert.equal() -> assert.strictEqual() * assert.ok(false) -> common.fail() PR-URL: nodejs#9932 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
'use strict';
2-
var common = require('../common');
3-
var net = require('net');
4-
var assert = require('assert');
2+
const common = require('../common');
3+
const net = require('net');
4+
const assert = require('assert');
55

66

77
// Hopefully nothing is running on common.PORT
8-
var c = net.createConnection(common.PORT);
8+
const c = net.createConnection(common.PORT);
99

1010
c.on('connect', function() {
11-
console.error('connected?!');
12-
assert.ok(false);
11+
common.fail('connected?!');
1312
});
1413

1514
c.on('error', common.mustCall(function(e) {
1615
console.error('couldn\'t connect.');
17-
assert.equal('ECONNREFUSED', e.code);
16+
assert.strictEqual('ECONNREFUSED', e.code);
1817
}));

0 commit comments

Comments
 (0)
Please sign in to comment.