diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js index 840bb6b785e..0bd1a3f3634 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -283,7 +283,7 @@ function setupProcessObject() { EventEmitter.call(process); Object.defineProperty(process, Symbol.toStringTag, { enumerable: false, - writable: false, + writable: true, configurable: false, value: 'process' }); diff --git a/test/es-module/test-esm-process.mjs b/test/es-module/test-esm-process.mjs index 24cf489a988..ea9b4b4936a 100644 --- a/test/es-module/test-esm-process.mjs +++ b/test/es-module/test-esm-process.mjs @@ -4,3 +4,4 @@ import assert from 'assert'; import process from 'process'; assert.strictEqual(Object.prototype.toString.call(process), '[object process]'); +assert(Object.getOwnPropertyDescriptor(process, Symbol.toStringTag).writable);