Browse Source

test: refactor test-listen-fd-ebadf

Replace var with const and assert.equal with assert.strictEqual.

PR-URL: https://github.com/nodejs/node/pull/10034
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
v6
Richard Karmazin 8 years ago
committed by Evan Lucas
parent
commit
00ea286800
  1. 8
      test/parallel/test-listen-fd-ebadf.js

8
test/parallel/test-listen-fd-ebadf.js

@ -1,7 +1,7 @@
'use strict'; 'use strict';
var common = require('../common'); const common = require('../common');
var assert = require('assert'); const assert = require('assert');
var net = require('net'); const net = require('net');
net.createServer(common.fail).listen({fd: 2}) net.createServer(common.fail).listen({fd: 2})
.on('error', common.mustCall(onError)); .on('error', common.mustCall(onError));
@ -9,5 +9,5 @@ net.createServer(common.fail).listen({fd: 42})
.on('error', common.mustCall(onError)); .on('error', common.mustCall(onError));
function onError(ex) { function onError(ex) {
assert.equal(ex.code, 'EINVAL'); assert.strictEqual(ex.code, 'EINVAL');
} }

Loading…
Cancel
Save