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>v7.x
Punit Buch
8 years ago
committed by
Jeremiah Senkpiel
1 changed files with 6 additions and 7 deletions
@ -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); |
|||
})); |
|||
|
Loading…
Reference in new issue