diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js index 33a594d35fcbb0..98428f02b43817 100644 --- a/lib/internal/bootstrap/pre_execution.js +++ b/lib/internal/bootstrap/pre_execution.js @@ -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; diff --git a/test/es-module/test-esm-process.mjs b/test/es-module/test-esm-process.mjs index 8fa006a304ed2f..f88eba849df715 100644 --- a/test/es-module/test-esm-process.mjs +++ b/test/es-module/test-esm-process.mjs @@ -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);