From 28d266f843505b716f12736a91e7ed9eb9a619c5 Mon Sep 17 00:00:00 2001 From: Friedel Ziegelmayer Date: Wed, 9 Nov 2016 13:45:41 +0100 Subject: [PATCH] add failing async test --- test/index.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/index.js b/test/index.js index 112f884..39e2dfe 100644 --- a/test/index.js +++ b/test/index.js @@ -30,6 +30,23 @@ tape('through', function (t) { ) }) +tape('through async', function (t) { + pull( + pull.values([1,2,3]), + through(function (data) { + var self = this + setTimeout(function () { + self.queue(data * 10) + }, 10) + }), + pull.collect(function (err, ary) { + if(err) throw err + t.deepEqual(ary, [10, 20, 30]) + t.end() + }) + ) +}) + tape('through + end', function (t) { pull( pull.values([1,2,3]),