From ceaa299958081035862b7c3cd7fd8884ffd527a2 Mon Sep 17 00:00:00 2001 From: Benjamin Gruenbaum Date: Sun, 13 Feb 2022 19:02:20 +0200 Subject: [PATCH] stream: revert revert `map` spec compliance This reverts commit 91d28d8b46cbb9b101ee2c51a32adafb12bc24b7. PR-URL: https://github.com/nodejs/node/pull/41933 Reviewed-By: Antoine du Hamel Reviewed-By: James M Snell Reviewed-By: Matteo Collina --- lib/stream.js | 2 +- test/parallel/test-stream-iterator-helpers-test262-tests.mjs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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();