mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
process: fix named report export
PR-URL: https://github.com/nodejs/node/pull/41861 Fixes: https://github.com/nodejs/node/issues/41774 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
a07757dc01
commit
60c71f35ee
@ -253,7 +253,7 @@ function setupStacktracePrinterOnSigint() {
|
|||||||
function initializeReport() {
|
function initializeReport() {
|
||||||
const { report } = require('internal/process/report');
|
const { report } = require('internal/process/report');
|
||||||
ObjectDefineProperty(process, 'report', {
|
ObjectDefineProperty(process, 'report', {
|
||||||
enumerable: false,
|
enumerable: true,
|
||||||
configurable: true,
|
configurable: true,
|
||||||
get() {
|
get() {
|
||||||
return report;
|
return report;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import '../common/index.mjs';
|
import '../common/index.mjs';
|
||||||
import assert from 'assert';
|
import assert from 'assert';
|
||||||
import process from 'process';
|
import process, { report } from 'process';
|
||||||
|
|
||||||
assert.strictEqual(Object.prototype.toString.call(process), '[object process]');
|
assert.strictEqual(Object.prototype.toString.call(process), '[object process]');
|
||||||
assert(Object.getOwnPropertyDescriptor(process, Symbol.toStringTag).writable);
|
assert(Object.getOwnPropertyDescriptor(process, Symbol.toStringTag).writable);
|
||||||
|
assert(report);
|
||||||
|
Loading…
Reference in New Issue
Block a user