mirror of
https://github.com/nodejs/node.git
synced 2025-05-06 21:35:34 +00:00

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>
14 lines
358 B
JavaScript
14 lines
358 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const net = require('net');
|
|
|
|
net.createServer(common.fail).listen({fd: 2})
|
|
.on('error', common.mustCall(onError));
|
|
net.createServer(common.fail).listen({fd: 42})
|
|
.on('error', common.mustCall(onError));
|
|
|
|
function onError(ex) {
|
|
assert.strictEqual(ex.code, 'EINVAL');
|
|
}
|