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 <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
madflow authored and danielleadams committed Apr 24, 2022
1 parent d4d9c00 commit 61ecdf8
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 @@ -238,7 +238,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 61ecdf8

Please sign in to comment.