summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2019-04-04 16:44:34 +0200
committerRuben Bridgewater <ruben@bridgewater.de>2019-05-02 23:16:14 +0200
commit57fd70fc7d3918a6bd4c714fe479488391a563f6 (patch)
treec9d381e3f6540211dda6492466f21e725771516d
parent495822f544a34feadc8d8c19e674f0b00eefefd6 (diff)
downloadandroid-node-v8-57fd70fc7d3918a6bd4c714fe479488391a563f6.tar.gz
android-node-v8-57fd70fc7d3918a6bd4c714fe479488391a563f6.tar.bz2
android-node-v8-57fd70fc7d3918a6bd4c714fe479488391a563f6.zip
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();