process: fix named report export

PR-URL: https://github.com/nodejs/node/pull/41861
Fixes: https://github.com/nodejs/node/issues/41774
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
madflow 2022-02-04 20:13:01 +01:00 committed by Benjamin Gruenbaum
parent a07757dc01
commit 60c71f35ee
2 changed files with 3 additions and 2 deletions

View File

@ -253,7 +253,7 @@ function setupStacktracePrinterOnSigint() {
function initializeReport() {
const { report } = require('internal/process/report');
ObjectDefineProperty(process, 'report', {
enumerable: false,
enumerable: true,
configurable: true,
get() {
return report;

View File

@ -1,6 +1,7 @@
import '../common/index.mjs';
import assert from 'assert';
import process from 'process';
import process, { report } from 'process';
assert.strictEqual(Object.prototype.toString.call(process), '[object process]');
assert(Object.getOwnPropertyDescriptor(process, Symbol.toStringTag).writable);
assert(report);