Skip to content

Commit

Permalink
test: improve code in test-http-bind-twice.js
Browse files Browse the repository at this point in the history
* use const instead of var for required modules
* use assert.strictEqual instead of assert.equal

PR-URL: #10318
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
edsadr authored and evanlucas committed Jan 4, 2017
1 parent 6796bf4 commit 9a0711d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/parallel/test-http-bind-twice.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
'use strict';
const common = require('../common');
var assert = require('assert');
var http = require('http');
const assert = require('assert');
const http = require('http');

var server1 = http.createServer(common.fail);
const server1 = http.createServer(common.fail);
server1.listen(0, '127.0.0.1', common.mustCall(function() {
var server2 = http.createServer(common.fail);
const server2 = http.createServer(common.fail);
server2.listen(this.address().port, '127.0.0.1', common.fail);

server2.on('error', common.mustCall(function(e) {
assert.equal(e.code, 'EADDRINUSE');
assert.strictEqual(e.code, 'EADDRINUSE');
server1.close();
}));
}));

0 comments on commit 9a0711d

Please sign in to comment.