mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
ESLint 4.x has stricter linting than previous versions. We are currently using the legacy indentation rules in the test directory. This commit changes the indentation of files to comply with the stricter 4.x linting and enable stricter linting in the test directory. Backport-PR-URL: https://github.com/nodejs/node/pull/14835 PR-URL: https://github.com/nodejs/node/pull/14431 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
27 lines
684 B
JavaScript
27 lines
684 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
|
|
const spawnSync = require('child_process').spawnSync;
|
|
|
|
const TIMER = 200;
|
|
const SLEEP = common.platformTimeout(5000);
|
|
|
|
switch (process.argv[2]) {
|
|
case 'child':
|
|
setTimeout(function() {
|
|
console.log('child fired');
|
|
process.exit(1);
|
|
}, SLEEP);
|
|
break;
|
|
default:
|
|
const start = Date.now();
|
|
const ret = spawnSync(process.execPath, [__filename, 'child'],
|
|
{timeout: TIMER});
|
|
assert.strictEqual(ret.error.errno, 'ETIMEDOUT');
|
|
const end = Date.now() - start;
|
|
assert(end < SLEEP);
|
|
assert(ret.status > 128 || ret.signal);
|
|
break;
|
|
}
|