The uncaught exception test for `_debugger.js` was not exercising some code (particularly concerning `interface_.child`) because of the synchronous nature of the test. This adds an asynchronous version to increase test coverage. PR-URL: https://github.com/nodejs/node/pull/8403 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: James M Snell <jasnell@gmail.com>
18 lines
385 B
JavaScript
18 lines
385 B
JavaScript
'use strict';
|
|
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const debug = require('_debugger');
|
|
|
|
function emit() {
|
|
const error = new Error('fhqwhgads');
|
|
process.emit('uncaughtException', error);
|
|
}
|
|
|
|
assert.doesNotThrow(emit);
|
|
|
|
// Send debug.start() an argv array of length 1 to avoid code that exits
|
|
// if argv is empty.
|
|
debug.start(['sterrance']);
|
|
|
|
setImmediate(emit);
|