Skip to content

Commit 9d6d45e

Browse files
BridgeARtargos
authored andcommitted
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: #27086 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent f1efe6d commit 9d6d45e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/_stream_transform.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,7 @@ function done(stream, er, data) {
209209
if (data != null) // Single equals check for both `null` and `undefined`
210210
stream.push(data);
211211

212-
// TODO(BridgeAR): Write a test for these two error cases
213-
// if there's nothing in the write buffer, then that means
214-
// that nothing more will ever be provided
212+
// These two error cases are coherence checks that can likely not be tested.
215213
if (stream._writableState.length)
216214
throw new ERR_TRANSFORM_WITH_LENGTH_0();
217215

0 commit comments

Comments
 (0)