Browse Source

benchmark,lib,test: adjust for linting

Formatting changes for upcoming linter update.

PR-URL: https://github.com/nodejs/node/pull/10561
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
v6
Rich Trott 8 years ago
parent
commit
a68987c154
  1. 10
      lib/internal/module.js
  2. 5
      lib/os.js
  3. 27
      lib/repl.js
  4. 10
      test/internet/test-dns-ipv4.js
  5. 10
      test/internet/test-dns-ipv6.js
  6. 5
      test/parallel/test-cli-eval.js
  7. 5
      test/parallel/test-cluster-worker-exit.js
  8. 15
      test/parallel/test-crypto-authenticated.js
  9. 10
      test/parallel/test-domain-throw-error-then-throw-from-uncaught-exception-handler.js
  10. 75
      test/parallel/test-preload.js
  11. 18
      test/parallel/test-punycode.js
  12. 6
      test/parallel/test-require-symlink.js
  13. 3
      test/parallel/test-util-inspect.js
  14. 12
      test/parallel/test-util-sigint-watchdog.js

10
lib/internal/module.js

@ -51,10 +51,12 @@ function stripBOM(content) {
return content; return content;
} }
exports.builtinLibs = ['assert', 'buffer', 'child_process', 'cluster', exports.builtinLibs = [
'crypto', 'dgram', 'dns', 'domain', 'events', 'fs', 'http', 'https', 'net', 'assert', 'buffer', 'child_process', 'cluster', 'crypto', 'dgram', 'dns',
'os', 'path', 'punycode', 'querystring', 'readline', 'repl', 'stream', 'domain', 'events', 'fs', 'http', 'https', 'net', 'os', 'path', 'punycode',
'string_decoder', 'tls', 'tty', 'url', 'util', 'v8', 'vm', 'zlib']; 'querystring', 'readline', 'repl', 'stream', 'string_decoder', 'tls', 'tty',
'url', 'util', 'v8', 'vm', 'zlib'
];
function addBuiltinLibsToObject(object) { function addBuiltinLibsToObject(object) {
// Make built-in modules available directly (loaded lazily). // Make built-in modules available directly (loaded lazily).

5
lib/os.js

@ -51,8 +51,9 @@ exports.tmpdir = function() {
return path; return path;
}; };
exports.tmpDir = internalUtil.deprecate(exports.tmpdir, const tmpDirDeprecationMsg =
'os.tmpDir() is deprecated. Use os.tmpdir() instead.'); 'os.tmpDir() is deprecated. Use os.tmpdir() instead.';
exports.tmpDir = internalUtil.deprecate(exports.tmpdir, tmpDirDeprecationMsg);
exports.getNetworkInterfaces = internalUtil.deprecate(function() { exports.getNetworkInterfaces = internalUtil.deprecate(function() {
return exports.networkInterfaces(); return exports.networkInterfaces();

27
lib/repl.js

@ -39,13 +39,13 @@ const debug = util.debuglog('repl');
const parentModule = module; const parentModule = module;
const replMap = new WeakMap(); const replMap = new WeakMap();
const GLOBAL_OBJECT_PROPERTIES = ['NaN', 'Infinity', 'undefined', const GLOBAL_OBJECT_PROPERTIES = [
'eval', 'parseInt', 'parseFloat', 'isNaN', 'isFinite', 'decodeURI', 'NaN', 'Infinity', 'undefined', 'eval', 'parseInt', 'parseFloat', 'isNaN',
'decodeURIComponent', 'encodeURI', 'encodeURIComponent', 'isFinite', 'decodeURI', 'decodeURIComponent', 'encodeURI',
'Object', 'Function', 'Array', 'String', 'Boolean', 'Number', 'encodeURIComponent', 'Object', 'Function', 'Array', 'String', 'Boolean',
'Date', 'RegExp', 'Error', 'EvalError', 'RangeError', 'Number', 'Date', 'RegExp', 'Error', 'EvalError', 'RangeError',
'ReferenceError', 'SyntaxError', 'TypeError', 'URIError', 'ReferenceError', 'SyntaxError', 'TypeError', 'URIError', 'Math', 'JSON'
'Math', 'JSON']; ];
const GLOBAL_OBJECT_PROPERTY_MAP = {}; const GLOBAL_OBJECT_PROPERTY_MAP = {};
GLOBAL_OBJECT_PROPERTIES.forEach((p) => GLOBAL_OBJECT_PROPERTY_MAP[p] = p); GLOBAL_OBJECT_PROPERTIES.forEach((p) => GLOBAL_OBJECT_PROPERTY_MAP[p] = p);
@ -1216,12 +1216,13 @@ function addStandardGlobals(completionGroups, filter) {
// Common keywords. Exclude for completion on the empty string, b/c // Common keywords. Exclude for completion on the empty string, b/c
// they just get in the way. // they just get in the way.
if (filter) { if (filter) {
completionGroups.push(['break', 'case', 'catch', 'const', completionGroups.push([
'continue', 'debugger', 'default', 'delete', 'do', 'else', 'break', 'case', 'catch', 'const', 'continue', 'debugger', 'default',
'export', 'false', 'finally', 'for', 'function', 'if', 'delete', 'do', 'else', 'export', 'false', 'finally', 'for', 'function',
'import', 'in', 'instanceof', 'let', 'new', 'null', 'return', 'if', 'import', 'in', 'instanceof', 'let', 'new', 'null', 'return',
'switch', 'this', 'throw', 'true', 'try', 'typeof', 'undefined', 'switch', 'this', 'throw', 'true', 'try', 'typeof', 'undefined', 'var',
'var', 'void', 'while', 'with', 'yield']); 'void', 'while', 'with', 'yield'
]);
} }
} }

10
test/internet/test-dns-ipv4.js

@ -164,21 +164,23 @@ TEST(function test_lookup_all_ipv4(done) {
}); });
done(); done();
} })
)); );
checkWrap(req); checkWrap(req);
}); });
TEST(function test_lookupservice_ip_ipv4(done) { TEST(function test_lookupservice_ip_ipv4(done) {
const req = dns.lookupService('127.0.0.1', 80, const req = dns.lookupService(
'127.0.0.1', 80,
common.mustCall((err, host, service) => { common.mustCall((err, host, service) => {
assert.ifError(err); assert.ifError(err);
assert.strictEqual(typeof host, 'string'); assert.strictEqual(typeof host, 'string');
assert(host); assert(host);
assert(['http', 'www', '80'].includes(service)); assert(['http', 'www', '80'].includes(service));
done(); done();
})); })
);
checkWrap(req); checkWrap(req);
}); });

10
test/internet/test-dns-ipv6.js

@ -169,14 +169,15 @@ TEST(function test_lookup_all_ipv6(done) {
}); });
done(); done();
} })
)); );
checkWrap(req); checkWrap(req);
}); });
TEST(function test_lookupservice_ip_ipv6(done) { TEST(function test_lookupservice_ip_ipv6(done) {
const req = dns.lookupService('::1', 80, const req = dns.lookupService(
'::1', 80,
common.mustCall((err, host, service) => { common.mustCall((err, host, service) => {
if (err) { if (err) {
// Not skipping the test, rather checking an alternative result, // Not skipping the test, rather checking an alternative result,
@ -188,7 +189,8 @@ TEST(function test_lookupservice_ip_ipv6(done) {
assert(host); assert(host);
assert(['http', 'www', '80'].includes(service)); assert(['http', 'www', '80'].includes(service));
done(); done();
})); })
);
checkWrap(req); checkWrap(req);
}); });

5
test/parallel/test-cli-eval.js

@ -87,8 +87,9 @@ child.exec(nodejs + ' -p "\\-42"',
child.exec(nodejs + ' --use-strict -p process.execArgv', child.exec(nodejs + ' --use-strict -p process.execArgv',
function(status, stdout, stderr) { function(status, stdout, stderr) {
assert.strictEqual(stdout, assert.strictEqual(
"[ '--use-strict', '-p', 'process.execArgv' ]\n"); stdout, "[ '--use-strict', '-p', 'process.execArgv' ]\n"
);
}); });
// Regression test for https://github.com/nodejs/node/issues/3574 // Regression test for https://github.com/nodejs/node/issues/3574

5
test/parallel/test-cluster-worker-exit.js

@ -32,8 +32,9 @@ if (cluster.isWorker) {
worker_emitExit: [1, "the worker did not emit 'exit'"], worker_emitExit: [1, "the worker did not emit 'exit'"],
worker_state: ['disconnected', 'the worker state is incorrect'], worker_state: ['disconnected', 'the worker state is incorrect'],
worker_suicideMode: [false, 'the worker.suicide flag is incorrect'], worker_suicideMode: [false, 'the worker.suicide flag is incorrect'],
worker_exitedAfterDisconnect: [false, worker_exitedAfterDisconnect: [
'the .exitedAfterDisconnect flag is incorrect'], false, 'the .exitedAfterDisconnect flag is incorrect'
],
worker_died: [true, 'the worker is still running'], worker_died: [true, 'the worker is still running'],
worker_exitCode: [EXIT_CODE, 'the worker exited w/ incorrect exitCode'], worker_exitCode: [EXIT_CODE, 'the worker exited w/ incorrect exitCode'],
worker_signalCode: [null, 'the worker exited w/ incorrect signalCode'] worker_signalCode: [null, 'the worker exited w/ incorrect signalCode']

15
test/parallel/test-crypto-authenticated.js

@ -324,7 +324,8 @@ for (const i in TEST_CASES) {
{ {
const encrypt = crypto.createCipheriv(test.algo, const encrypt = crypto.createCipheriv(test.algo,
Buffer.from(test.key, 'hex'), Buffer.from(test.iv, 'hex')); Buffer.from(test.key, 'hex'),
Buffer.from(test.iv, 'hex'));
if (test.aad) if (test.aad)
encrypt.setAAD(Buffer.from(test.aad, 'hex')); encrypt.setAAD(Buffer.from(test.aad, 'hex'));
@ -342,7 +343,8 @@ for (const i in TEST_CASES) {
{ {
const decrypt = crypto.createDecipheriv(test.algo, const decrypt = crypto.createDecipheriv(test.algo,
Buffer.from(test.key, 'hex'), Buffer.from(test.iv, 'hex')); Buffer.from(test.key, 'hex'),
Buffer.from(test.iv, 'hex'));
decrypt.setAuthTag(Buffer.from(test.tag, 'hex')); decrypt.setAuthTag(Buffer.from(test.tag, 'hex'));
if (test.aad) if (test.aad)
decrypt.setAAD(Buffer.from(test.aad, 'hex')); decrypt.setAAD(Buffer.from(test.aad, 'hex'));
@ -401,7 +403,8 @@ for (const i in TEST_CASES) {
{ {
// trying to get tag before inputting all data: // trying to get tag before inputting all data:
const encrypt = crypto.createCipheriv(test.algo, const encrypt = crypto.createCipheriv(test.algo,
Buffer.from(test.key, 'hex'), Buffer.from(test.iv, 'hex')); Buffer.from(test.key, 'hex'),
Buffer.from(test.iv, 'hex'));
encrypt.update('blah', 'ascii'); encrypt.update('blah', 'ascii');
assert.throws(function() { encrypt.getAuthTag(); }, / state/); assert.throws(function() { encrypt.getAuthTag(); }, / state/);
} }
@ -409,7 +412,8 @@ for (const i in TEST_CASES) {
{ {
// trying to set tag on encryption object: // trying to set tag on encryption object:
const encrypt = crypto.createCipheriv(test.algo, const encrypt = crypto.createCipheriv(test.algo,
Buffer.from(test.key, 'hex'), Buffer.from(test.iv, 'hex')); Buffer.from(test.key, 'hex'),
Buffer.from(test.iv, 'hex'));
assert.throws(() => { encrypt.setAuthTag(Buffer.from(test.tag, 'hex')); }, assert.throws(() => { encrypt.setAuthTag(Buffer.from(test.tag, 'hex')); },
/ state/); / state/);
} }
@ -417,7 +421,8 @@ for (const i in TEST_CASES) {
{ {
// trying to read tag from decryption object: // trying to read tag from decryption object:
const decrypt = crypto.createDecipheriv(test.algo, const decrypt = crypto.createDecipheriv(test.algo,
Buffer.from(test.key, 'hex'), Buffer.from(test.iv, 'hex')); Buffer.from(test.key, 'hex'),
Buffer.from(test.iv, 'hex'));
assert.throws(function() { decrypt.getAuthTag(); }, / state/); assert.throws(function() { decrypt.getAuthTag(); }, / state/);
} }

10
test/parallel/test-domain-throw-error-then-throw-from-uncaught-exception-handler.js

@ -49,7 +49,8 @@ if (process.argv[2] === 'child') {
} }
function runTestWithoutAbortOnUncaughtException() { function runTestWithoutAbortOnUncaughtException() {
child_process.exec(createTestCmdLine(), child_process.exec(
createTestCmdLine(),
function onTestDone(err, stdout, stderr) { function onTestDone(err, stdout, stderr) {
// When _not_ passing --abort-on-uncaught-exception, the process' // When _not_ passing --abort-on-uncaught-exception, the process'
// uncaughtException handler _must_ be called, and thus the error // uncaughtException handler _must_ be called, and thus the error
@ -58,13 +59,14 @@ function runTestWithoutAbortOnUncaughtException() {
assert(stderr.includes(uncaughtExceptionHandlerErrMsg), assert(stderr.includes(uncaughtExceptionHandlerErrMsg),
'stderr output must include proper uncaughtException ' + 'stderr output must include proper uncaughtException ' +
'handler\'s error\'s message'); 'handler\'s error\'s message');
assert(!stderr.includes(domainErrMsg), 'stderr output must not ' + assert(!stderr.includes(domainErrMsg),
'include domain\'s error\'s message'); 'stderr output must not include domain\'s error\'s message');
assert.notStrictEqual(err.code, 0, assert.notStrictEqual(err.code, 0,
'child process should have exited with a ' + 'child process should have exited with a ' +
'non-zero exit code, but did not'); 'non-zero exit code, but did not');
}); }
);
} }
function runTestWithAbortOnUncaughtException() { function runTestWithAbortOnUncaughtException() {

75
test/parallel/test-preload.js

@ -32,43 +32,41 @@ const fixtureD = fixture('define-global.js');
const fixtureThrows = fixture('throws_error4.js'); const fixtureThrows = fixture('throws_error4.js');
// test preloading a single module works // test preloading a single module works
childProcess.exec(nodeBinary + ' ' + childProcess.exec(nodeBinary + ' ' + preloadOption([fixtureA]) + ' ' + fixtureB,
preloadOption([fixtureA]) + ' ' +
fixtureB,
function(err, stdout, stderr) { function(err, stdout, stderr) {
assert.ifError(err); if (err) throw err;
assert.strictEqual(stdout, 'A\nB\n'); assert.strictEqual(stdout, 'A\nB\n');
}); });
// test preloading multiple modules works // test preloading multiple modules works
childProcess.exec(nodeBinary + ' ' + childProcess.exec(
preloadOption([fixtureA, fixtureB]) + ' ' + nodeBinary + ' ' + preloadOption([fixtureA, fixtureB]) + ' ' + fixtureC,
fixtureC,
function(err, stdout, stderr) { function(err, stdout, stderr) {
assert.ifError(err); if (err) throw err;
assert.strictEqual(stdout, 'A\nB\nC\n'); assert.strictEqual(stdout, 'A\nB\nC\n');
}); }
);
// test that preloading a throwing module aborts // test that preloading a throwing module aborts
childProcess.exec(nodeBinary + ' ' + childProcess.exec(
preloadOption([fixtureA, fixtureThrows]) + ' ' + nodeBinary + ' ' + preloadOption([fixtureA, fixtureThrows]) + ' ' + fixtureB,
fixtureB,
function(err, stdout, stderr) { function(err, stdout, stderr) {
if (err) { if (err) {
assert.strictEqual(stdout, 'A\n'); assert.strictEqual(stdout, 'A\n');
} else { } else {
throw new Error('Preload should have failed'); throw new Error('Preload should have failed');
} }
}); }
);
// test that preload can be used with --eval // test that preload can be used with --eval
childProcess.exec(nodeBinary + ' ' + childProcess.exec(
preloadOption([fixtureA]) + nodeBinary + ' ' + preloadOption([fixtureA]) + '-e "console.log(\'hello\');"',
'-e "console.log(\'hello\');"',
function(err, stdout, stderr) { function(err, stdout, stderr) {
assert.ifError(err); if (err) throw err;
assert.strictEqual(stdout, 'A\nhello\n'); assert.strictEqual(stdout, 'A\nhello\n');
}); }
);
// test that preload can be used with stdin // test that preload can be used with stdin
const stdinProc = childProcess.spawn( const stdinProc = childProcess.spawn(
@ -108,42 +106,43 @@ replProc.on('close', function(code) {
// test that preload placement at other points in the cmdline // test that preload placement at other points in the cmdline
// also test that duplicated preload only gets loaded once // also test that duplicated preload only gets loaded once
childProcess.exec(nodeBinary + ' ' + childProcess.exec(
preloadOption([fixtureA]) + nodeBinary + ' ' + preloadOption([fixtureA]) +
'-e "console.log(\'hello\');" ' + '-e "console.log(\'hello\');" ' + preloadOption([fixtureA, fixtureB]),
preloadOption([fixtureA, fixtureB]),
function(err, stdout, stderr) { function(err, stdout, stderr) {
assert.ifError(err); if (err) throw err;
assert.strictEqual(stdout, 'A\nB\nhello\n'); assert.strictEqual(stdout, 'A\nB\nhello\n');
}); }
);
// test that preload works with -i // test that preload works with -i
const interactive = childProcess.exec(nodeBinary + ' ' + const interactive = childProcess.exec(
preloadOption([fixtureD]) + nodeBinary + ' ' + preloadOption([fixtureD]) + '-i',
'-i',
common.mustCall(function(err, stdout, stderr) { common.mustCall(function(err, stdout, stderr) {
assert.ifError(err); assert.ifError(err);
assert.strictEqual(stdout, "> 'test'\n> "); assert.strictEqual(stdout, "> 'test'\n> ");
})); })
);
interactive.stdin.write('a\n'); interactive.stdin.write('a\n');
interactive.stdin.write('process.exit()\n'); interactive.stdin.write('process.exit()\n');
childProcess.exec(nodeBinary + ' ' + childProcess.exec(
'--require ' + fixture('cluster-preload.js') + ' ' + nodeBinary + ' ' + '--require ' + fixture('cluster-preload.js') + ' ' +
fixture('cluster-preload-test.js'), fixture('cluster-preload-test.js'),
function(err, stdout, stderr) { function(err, stdout, stderr) {
assert.ifError(err); if (err) throw err;
assert.ok(/worker terminated with code 43/.test(stdout)); assert.ok(/worker terminated with code 43/.test(stdout));
}); }
);
// https://github.com/nodejs/node/issues/1691 // https://github.com/nodejs/node/issues/1691
process.chdir(common.fixturesDir); process.chdir(common.fixturesDir);
childProcess.exec(nodeBinary + ' ' + childProcess.exec(
'--expose_debug_as=v8debug ' + nodeBinary + ' ' + '--expose_debug_as=v8debug ' + '--require ' +
'--require ' + fixture('cluster-preload.js') + ' ' + fixture('cluster-preload.js') + ' ' + 'cluster-preload-test.js',
'cluster-preload-test.js',
function(err, stdout, stderr) { function(err, stdout, stderr) {
assert.ifError(err); if (err) throw err;
assert.ok(/worker terminated with code 43/.test(stdout)); assert.ok(/worker terminated with code 43/.test(stdout));
}); }
);

18
test/parallel/test-punycode.js

@ -6,17 +6,23 @@ const assert = require('assert');
assert.strictEqual(punycode.encode('ü'), 'tda'); assert.strictEqual(punycode.encode('ü'), 'tda');
assert.strictEqual(punycode.encode('Goethe'), 'Goethe-'); assert.strictEqual(punycode.encode('Goethe'), 'Goethe-');
assert.strictEqual(punycode.encode('Bücher'), 'Bcher-kva'); assert.strictEqual(punycode.encode('Bücher'), 'Bcher-kva');
assert.strictEqual(punycode.encode( assert.strictEqual(
'Willst du die Blüthe des frühen, die Früchte des späteren Jahres'), punycode.encode(
'Willst du die Blthe des frhen, die Frchte des spteren Jahres-x9e96lkal'); 'Willst du die Blüthe des frühen, die Früchte des späteren Jahres'
),
'Willst du die Blthe des frhen, die Frchte des spteren Jahres-x9e96lkal'
);
assert.strictEqual(punycode.encode('日本語'), 'wgv71a119e'); assert.strictEqual(punycode.encode('日本語'), 'wgv71a119e');
assert.strictEqual(punycode.decode('tda'), 'ü'); assert.strictEqual(punycode.decode('tda'), 'ü');
assert.strictEqual(punycode.decode('Goethe-'), 'Goethe'); assert.strictEqual(punycode.decode('Goethe-'), 'Goethe');
assert.strictEqual(punycode.decode('Bcher-kva'), 'Bücher'); assert.strictEqual(punycode.decode('Bcher-kva'), 'Bücher');
assert.strictEqual(punycode.decode( assert.strictEqual(
'Willst du die Blthe des frhen, die Frchte des spteren Jahres-x9e96lkal'), punycode.decode(
'Willst du die Blüthe des frühen, die Früchte des späteren Jahres'); 'Willst du die Blthe des frhen, die Frchte des spteren Jahres-x9e96lkal'
),
'Willst du die Blüthe des frühen, die Früchte des späteren Jahres'
);
assert.strictEqual(punycode.decode('wgv71a119e'), '日本語'); assert.strictEqual(punycode.decode('wgv71a119e'), '日本語');
// http://tools.ietf.org/html/rfc3492#section-7.1 // http://tools.ietf.org/html/rfc3492#section-7.1

6
test/parallel/test-require-symlink.js

@ -13,8 +13,10 @@ common.refreshTmpDir();
const linkTarget = path.join(common.fixturesDir, const linkTarget = path.join(common.fixturesDir,
'/module-require-symlink/node_modules/dep2/'); '/module-require-symlink/node_modules/dep2/');
const linkDir = path.join(common.fixturesDir, const linkDir = path.join(
'/module-require-symlink/node_modules/dep1/node_modules/dep2'); common.fixturesDir,
'/module-require-symlink/node_modules/dep1/node_modules/dep2'
);
const linkScriptTarget = path.join(common.fixturesDir, const linkScriptTarget = path.join(common.fixturesDir,
'/module-require-symlink/symlinked.js'); '/module-require-symlink/symlinked.js');

3
test/parallel/test-util-inspect.js

@ -206,7 +206,8 @@ for (const showHidden of [true, false]) {
// Objects without prototype // Objects without prototype
{ {
const out = util.inspect(Object.create(null, const out = util.inspect(Object.create(null,
{ name: {value: 'Tim', enumerable: true}, { name: {value: 'Tim',
enumerable: true},
hidden: {value: 'secret'}}), true); hidden: {value: 'secret'}}), true);
if (out !== "{ [hidden]: 'secret', name: 'Tim' }" && if (out !== "{ [hidden]: 'secret', name: 'Tim' }" &&
out !== "{ name: 'Tim', [hidden]: 'secret' }") { out !== "{ name: 'Tim', [hidden]: 'secret' }") {

12
test/parallel/test-util-sigint-watchdog.js

@ -16,7 +16,7 @@ if (common.isWindows) {
assert.strictEqual(hadPendingSignals, false); assert.strictEqual(hadPendingSignals, false);
next(); next();
}, },
(next) => { (next) => {
// Test with one call to the watchdog, one signal. // Test with one call to the watchdog, one signal.
binding.startSigintWatchdog(); binding.startSigintWatchdog();
process.kill(process.pid, 'SIGINT'); process.kill(process.pid, 'SIGINT');
@ -25,8 +25,8 @@ if (common.isWindows) {
assert.strictEqual(hadPendingSignals, true); assert.strictEqual(hadPendingSignals, true);
next(); next();
})); }));
}, },
(next) => { (next) => {
// Nested calls are okay. // Nested calls are okay.
binding.startSigintWatchdog(); binding.startSigintWatchdog();
binding.startSigintWatchdog(); binding.startSigintWatchdog();
@ -38,8 +38,8 @@ if (common.isWindows) {
assert.strictEqual(hadPendingSignals2, false); assert.strictEqual(hadPendingSignals2, false);
next(); next();
})); }));
}, },
() => { () => {
// Signal comes in after first call to stop. // Signal comes in after first call to stop.
binding.startSigintWatchdog(); binding.startSigintWatchdog();
binding.startSigintWatchdog(); binding.startSigintWatchdog();
@ -50,7 +50,7 @@ if (common.isWindows) {
assert.strictEqual(hadPendingSignals1, false); assert.strictEqual(hadPendingSignals1, false);
assert.strictEqual(hadPendingSignals2, true); assert.strictEqual(hadPendingSignals2, true);
})); }));
}].reduceRight((a, b) => common.mustCall(b).bind(null, a))(); }].reduceRight((a, b) => common.mustCall(b).bind(null, a))();
function waitForPendingSignal(cb) { function waitForPendingSignal(cb) {
if (binding.watchdogHasPendingSigint()) if (binding.watchdogHasPendingSigint())

Loading…
Cancel
Save