summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2019-04-04 16:44:34 +0200
committerMichaƫl Zasso <targos@protonmail.com>2019-05-04 09:20:20 +0200
commit9d6d45e7d22e482c9ad1c4cae0385a9eb1715310 (patch)
tree5fcc1a00563a59786702acfa6f41f45a97dedcd8
parentf1efe6dae0aefac1872d27ad538cc7624245341f (diff)
downloadnode-new-9d6d45e7d22e482c9ad1c4cae0385a9eb1715310.tar.gz
stream: remove TODO and add a description instead
After looking into this it turned out that these two errors are sanity checks that should not be reached. It is unfortunate that we assigned error codes for these but changing it into an assertion seems to be a hassle for `readable-streams`. PR-URL: https://github.com/nodejs/node/pull/27086 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
-rw-r--r--lib/_stream_transform.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js
index ab6ada8dec..b4fffaa988 100644
--- a/lib/_stream_transform.js
+++ b/lib/_stream_transform.js
@@ -209,9 +209,7 @@ function done(stream, er, data) {
if (data != null) // Single equals check for both `null` and `undefined`
stream.push(data);
- // TODO(BridgeAR): Write a test for these two error cases
- // if there's nothing in the write buffer, then that means
- // that nothing more will ever be provided
+ // These two error cases are coherence checks that can likely not be tested.
if (stream._writableState.length)
throw new ERR_TRANSFORM_WITH_LENGTH_0();