Streams to make test other Streams
npm install stream-tester
|16||downloads in the last day|
|113||downloads in the last week|
|328||downloads in the last month|
|Version||0.0.5 last updated a year ago|
|Keywords||stream, test, spec, exercise, pipe|
|Dependencies||through, from, assertions|
Streams to assist testing Streams
writing streams can be difficult, one of the most difficult aspects can be testing them thoroughly.
that is where stream-tester comes in. stream-tester can be used to generate data to exercise your streams. combine it with stream-spec which will validate your stream's behaviour and you've got a pretty easy test suite.
createRandomStream (generator, max)
create a stream of random chunks.
generator defaults to
max defaults to
create a stream of increasing numbers, up to
createPauseStream (prob, delay)
create a through stream that randomly pauses
(returns false from
prob is the probability
of a pause.
delay is the time to wait before emitting
'drain'. defaults are
delay is next tick.