mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
9d1a3b6f60
This commit makes the --experimental-report CLI flag a no-op. PR-URL: https://github.com/nodejs/node/pull/32242 Fixes: https://github.com/nodejs/node/issues/26293 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
21 lines
608 B
JavaScript
21 lines
608 B
JavaScript
// Flags: --report-uncaught-exception
|
|
'use strict';
|
|
// Test producing a report on uncaught exception.
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const helper = require('../common/report');
|
|
const tmpdir = require('../common/tmpdir');
|
|
const error = new Error('test error');
|
|
|
|
tmpdir.refresh();
|
|
process.report.directory = tmpdir.path;
|
|
|
|
process.on('uncaughtException', common.mustCall((err) => {
|
|
assert.strictEqual(err, error);
|
|
const reports = helper.findReports(process.pid, tmpdir.path);
|
|
assert.strictEqual(reports.length, 1);
|
|
helper.validate(reports[0]);
|
|
}));
|
|
|
|
throw error;
|