diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js index be5d0c832b6092..6048d89bb08037 100644 --- a/lib/internal/bootstrap/pre_execution.js +++ b/lib/internal/bootstrap/pre_execution.js @@ -262,7 +262,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);