From 7f9035decc16416dafec7a7dc0e622cb6e086ce6 Mon Sep 17 00:00:00 2001 From: Adrian Estrada Date: Sat, 17 Dec 2016 11:10:52 -0500 Subject: [PATCH] test: improve code in test-http-bind-twice.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * use const instead of var for required modules * use assert.strictEqual instead of assert.equal PR-URL: https://github.com/nodejs/node/pull/10318 Reviewed-By: Colin Ihrig Reviewed-By: Michaƫl Zasso Reviewed-By: Italo A. Casas Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- test/parallel/test-http-bind-twice.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-http-bind-twice.js b/test/parallel/test-http-bind-twice.js index ccbd84b149f381..f90905d3260f8a 100644 --- a/test/parallel/test-http-bind-twice.js +++ b/test/parallel/test-http-bind-twice.js @@ -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(); })); }));