From 6de9482a890a5bb5588696eccb17e82dd3ec0432 Mon Sep 17 00:00:00 2001 From: Jesse Wertheim Date: Thu, 15 Mar 2018 23:13:55 -0400 Subject: [PATCH] Add null to the end of the source array in readArray to close the stream. Fixes #2 --- test/test.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test.js b/test/test.js index 4d4d9e2..1c24789 100644 --- a/test/test.js +++ b/test/test.js @@ -7,8 +7,10 @@ var stream = require('../'), transduce = require('any-transduce'), test = require('tape') -function readArray(source){ - var read = new Readable() + +function readArray(_source){ + var source = _source.concat(null), + read = new Readable() read._read = function(){ read.push(source.shift()) }