Skip to content

Commit

Permalink
process: fix named report export
Browse files Browse the repository at this point in the history
PR-URL: #41861
Fixes: #41774
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
madflow authored and sxa committed Mar 7, 2022
1 parent 7ed2c19 commit 7c49785
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/internal/bootstrap/pre_execution.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion test/es-module/test-esm-process.mjs
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 7c49785

Please sign in to comment.