test: add tests for a some stream.Readable use cases#7260
test: add tests for a some stream.Readable use cases#7260addaleax merged 1 commit intonodejs:masterfrom
Conversation
|
Thx @addaleax, these are much needed! Would you mind adding the equivalent of test/parallel/test-stream-readable-invalid-chunk.js |
There was a problem hiding this comment.
why on('exit')? I would prefer having those when the streams ends. I think it's cleaner to read.
|
@mcollina In |
|
@addaleax quite true :), forget my comment (not enough coffee this morning). |
There was a problem hiding this comment.
there are probably some extra spaces here
There was a problem hiding this comment.
@mcollina Fixed (if you’re talking about the spaces before the comment)
|
LGTM |
|
should we squash this or leave them as 4 separate commits as they do 4 separate things, my gut says leave them be but I'm not sure @Fishrock123 opinion ? |
|
I don’t care a lot about squashing these or not. When landing other PRs, I usually go by something like “bisectable logical units”, so I’d probably leave them as they are unless somebody objects to that. |
|
Rebased against the current master, one more CI just to be sure: https://ci.nodejs.org/job/node-test-commit/3759/ |
|
We usually squash to edit/reconstruct the metadata easily. |
* test: check invalid chunk error for readable.push Test that passing invalid chunks to readable.push() in non-object mode throw errors. * test: add simple object mode + decoder stream test * test: add test for readable stream lacking _read Check that using a readable stream without a _read method will throw an error. * test: add basic test for piping to multiple dests Add a simple test for piping and unpiping from a readable stream to multiple writable streams. PR-URL: nodejs#7260 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* test: check invalid chunk error for readable.push Test that passing invalid chunks to readable.push() in non-object mode throw errors. * test: add simple object mode + decoder stream test * test: add test for readable stream lacking _read Check that using a readable stream without a _read method will throw an error. * test: add basic test for piping to multiple dests Add a simple test for piping and unpiping from a readable stream to multiple writable streams. PR-URL: #7260 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* test: check invalid chunk error for readable.push Test that passing invalid chunks to readable.push() in non-object mode throw errors. * test: add simple object mode + decoder stream test * test: add test for readable stream lacking _read Check that using a readable stream without a _read method will throw an error. * test: add basic test for piping to multiple dests Add a simple test for piping and unpiping from a readable stream to multiple writable streams. PR-URL: #7260 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* test: check invalid chunk error for readable.push Test that passing invalid chunks to readable.push() in non-object mode throw errors. * test: add simple object mode + decoder stream test * test: add test for readable stream lacking _read Check that using a readable stream without a _read method will throw an error. * test: add basic test for piping to multiple dests Add a simple test for piping and unpiping from a readable stream to multiple writable streams. PR-URL: #7260 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* test: check invalid chunk error for readable.push Test that passing invalid chunks to readable.push() in non-object mode throw errors. * test: add simple object mode + decoder stream test * test: add test for readable stream lacking _read Check that using a readable stream without a _read method will throw an error. * test: add basic test for piping to multiple dests Add a simple test for piping and unpiping from a readable stream to multiple writable streams. PR-URL: #7260 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* test: check invalid chunk error for readable.push Test that passing invalid chunks to readable.push() in non-object mode throw errors. * test: add simple object mode + decoder stream test * test: add test for readable stream lacking _read Check that using a readable stream without a _read method will throw an error. * test: add basic test for piping to multiple dests Add a simple test for piping and unpiping from a readable stream to multiple writable streams. PR-URL: #7260 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* test: check invalid chunk error for readable.push Test that passing invalid chunks to readable.push() in non-object mode throw errors. * test: add simple object mode + decoder stream test * test: add test for readable stream lacking _read Check that using a readable stream without a _read method will throw an error. * test: add basic test for piping to multiple dests Add a simple test for piping and unpiping from a readable stream to multiple writable streams. PR-URL: #7260 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Checklist
make -j4 test(UNIX) orvcbuild test nosign(Windows) passesAffected core subsystem(s)
test
Description of change
Adds tests for a couple of
stream.Readableuse cases that were previously not covered by tests./cc @nodejs/streams
CI: https://ci.nodejs.org/job/node-test-commit/3709/