Skip to content

Commit 9a0711d

Browse files
edsadrevanlucas
authored andcommitted
test: improve code in test-http-bind-twice.js
* 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]>
1 parent 6796bf4 commit 9a0711d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/parallel/test-http-bind-twice.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
'use strict';
22
const common = require('../common');
3-
var assert = require('assert');
4-
var http = require('http');
3+
const assert = require('assert');
4+
const http = require('http');
55

6-
var server1 = http.createServer(common.fail);
6+
const server1 = http.createServer(common.fail);
77
server1.listen(0, '127.0.0.1', common.mustCall(function() {
8-
var server2 = http.createServer(common.fail);
8+
const server2 = http.createServer(common.fail);
99
server2.listen(this.address().port, '127.0.0.1', common.fail);
1010

1111
server2.on('error', common.mustCall(function(e) {
12-
assert.equal(e.code, 'EADDRINUSE');
12+
assert.strictEqual(e.code, 'EADDRINUSE');
1313
server1.close();
1414
}));
1515
}));

0 commit comments

Comments
 (0)