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 benjamingr committed Feb 23, 2022
1 parent a07757d commit 60c71f3
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 @@ -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;
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 60c71f3

Please sign in to comment.