mirror of
https://github.com/nodejs/node.git
synced 2025-05-06 06:38:13 +00:00

Enable linting for the test directory. A number of changes was made so all tests conform the current rules used by lib and src directories. The only exception for tests is that unreachable (dead) code is allowed. test-fs-non-number-arguments-throw had to be excluded from the changes because of a weird issue on Windows CI. PR-URL: https://github.com/nodejs/io.js/pull/1721 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
22 lines
389 B
JavaScript
22 lines
389 B
JavaScript
'use strict';
|
|
var assert = require('assert');
|
|
var common = require('../common');
|
|
var net = require('net');
|
|
|
|
var server = net.createServer(assert.fail);
|
|
var closeEvents = 0;
|
|
|
|
server.on('close', function() {
|
|
++closeEvents;
|
|
});
|
|
|
|
server.listen(common.PORT, function() {
|
|
assert(false);
|
|
});
|
|
|
|
server.close('bad argument');
|
|
|
|
process.on('exit', function() {
|
|
assert.equal(closeEvents, 1);
|
|
});
|