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>
This commit is contained in:
parent
ee8848ddb6
commit
00ea286800
@ -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…
x
Reference in New Issue
Block a user