diff --git a/lib/stream.js b/lib/stream.js index e077ef257abda1..9794bdb45b4df4 100644 --- a/lib/stream.js +++ b/lib/stream.js @@ -69,7 +69,7 @@ for (const key of ObjectKeys(streamReturningOperators)) { value: fn, enumerable: false, configurable: true, - writable: true, + writable: false, }); } for (const key of ObjectKeys(promiseReturningOperators)) { diff --git a/test/parallel/test-stream-iterator-helpers-test262-tests.mjs b/test/parallel/test-stream-iterator-helpers-test262-tests.mjs index ea05717f4197f3..d2e3a8bae02dbf 100644 --- a/test/parallel/test-stream-iterator-helpers-test262-tests.mjs +++ b/test/parallel/test-stream-iterator-helpers-test262-tests.mjs @@ -68,7 +68,7 @@ import assert from 'assert'; ); assert.strictEqual(descriptor.enumerable, false); assert.strictEqual(descriptor.configurable, true); - // assert.strictEqual(descriptor.writable, false); + assert.strictEqual(descriptor.writable, false); } { // drop/length @@ -79,7 +79,7 @@ import assert from 'assert'; ); assert.strictEqual(descriptor.enumerable, false); assert.strictEqual(descriptor.configurable, true); - // assert.strictEqual(descriptor.writable, false); + assert.strictEqual(descriptor.writable, false); // drop/limit-equals-total const iterator = Readable.from([1, 2]).drop(2); const result = await iterator[Symbol.asyncIterator]().next();