mirror of https://github.com/lukechilds/node.git
Browse Source
* var -> const * assert.equal() -> assert.strictEqual() * assert.ok(false) -> common.fail() PR-URL: https://github.com/nodejs/node/pull/9932 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>v6.x
committed by
Anna Henningsen
1 changed files with 6 additions and 7 deletions
@ -1,18 +1,17 @@ |
|||||
'use strict'; |
'use strict'; |
||||
var common = require('../common'); |
const common = require('../common'); |
||||
var net = require('net'); |
const net = require('net'); |
||||
var assert = require('assert'); |
const assert = require('assert'); |
||||
|
|
||||
|
|
||||
// Hopefully nothing is running on common.PORT
|
// Hopefully nothing is running on common.PORT
|
||||
var c = net.createConnection(common.PORT); |
const c = net.createConnection(common.PORT); |
||||
|
|
||||
c.on('connect', function() { |
c.on('connect', function() { |
||||
console.error('connected?!'); |
common.fail('connected?!'); |
||||
assert.ok(false); |
|
||||
}); |
}); |
||||
|
|
||||
c.on('error', common.mustCall(function(e) { |
c.on('error', common.mustCall(function(e) { |
||||
console.error('couldn\'t connect.'); |
console.error('couldn\'t connect.'); |
||||
assert.equal('ECONNREFUSED', e.code); |
assert.strictEqual('ECONNREFUSED', e.code); |
||||
})); |
})); |
||||
|
Loading…
Reference in new issue