Skip to content

Commit

Permalink
process: fix named report export
Browse files Browse the repository at this point in the history
  • Loading branch information
madflow committed Feb 5, 2022
1 parent 662fb5f commit f90b3d5
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 @@ -196,7 +196,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 f90b3d5

Please sign in to comment.