Browse Source

test: polish test-net-better-error-messages-listen

Cleans up test-net-better-error-messages-list.js with following:
- var -> const
- assert.equal -> assert.strictEqual

PR-URL: https://github.com/nodejs/node/pull/10087
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
v4.x
Hitesh Kanwathirtha 8 years ago
committed by Myles Borins
parent
commit
37d734ae36
  1. 14
      test/parallel/test-net-better-error-messages-listen.js

14
test/parallel/test-net-better-error-messages-listen.js

@ -1,12 +1,12 @@
'use strict';
var common = require('../common');
var assert = require('assert');
var net = require('net');
const common = require('../common');
const assert = require('assert');
const net = require('net');
var server = net.createServer(common.fail);
const server = net.createServer(common.fail);
server.listen(1, '1.1.1.1', common.fail);
server.on('error', common.mustCall(function(e) {
assert.equal(e.address, '1.1.1.1');
assert.equal(e.port, 1);
assert.equal(e.syscall, 'listen');
assert.strictEqual(e.address, '1.1.1.1');
assert.strictEqual(e.port, 1);
assert.strictEqual(e.syscall, 'listen');
}));

Loading…
Cancel
Save