From a89a8535d749662b1fb699299ad67b05d22c6fd1 Mon Sep 17 00:00:00 2001 From: Benjamin Gruenbaum Date: Fri, 11 Feb 2022 15:11:12 +0200 Subject: [PATCH] stream: revert `map` spec compliance PR-URL: https://github.com/nodejs/node/pull/41931 Fixes: https://github.com/nodejs/node/issues/41926 Reviewed-By: Antoine du Hamel Reviewed-By: Matteo Collina Reviewed-By: Robert Nagy --- 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 9794bdb45b4df4..e077ef257abda1 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: false, + writable: true, }); } 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 d2e3a8bae02dbf..ea05717f4197f3 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();