diff --git a/test/abort/test-abort-uncaught-exception.js b/test/abort/test-abort-uncaught-exception.js index 0d9fa6884df9dc..f9847193769d2d 100644 --- a/test/abort/test-abort-uncaught-exception.js +++ b/test/abort/test-abort-uncaught-exception.js @@ -9,23 +9,26 @@ if (process.argv[2] === 'child') { throw new Error('child error'); } else { run('', null); - run('--abort-on-uncaught-exception', 'SIGABRT'); + run('--abort-on-uncaught-exception', ['SIGABRT', 'SIGILL']); } -function run(flags, signal) { +function run(flags, signals) { const args = [__filename, 'child']; if (flags) args.unshift(flags); const child = spawn(node, args); child.on('exit', common.mustCall(function(code, sig) { - if (!common.isWindows) { - assert.strictEqual(sig, signal); - } else { - if (signal) + if (common.isWindows) { + if (signals) assert.strictEqual(code, 3); else assert.strictEqual(code, 1); + } else { + if (signals) + assert.strictEqual(signals.includes(sig), true); + else + assert.strictEqual(sig, null); } })); }