From 445372a55113b91877bc984845c5e483cef6eb10 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Tue, 10 Oct 2017 21:01:42 +0200 Subject: [PATCH] add huge stack test --- test.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test.js b/test.js index 8ec9598..277634c 100644 --- a/test.js +++ b/test.js @@ -103,3 +103,20 @@ tape('each with falsey values', function (t) { }) }) +tape('huge stack', function (t) { + var s = through.obj() + + for (var i = 0; i < 5000; i++) { + s.write('foo') + } + + s.end() + + each(s, function (data, cb) { + if (data !== 'foo') t.fail('bad data') + cb() + }, function (err) { + t.error(err, 'no error') + t.end() + }) +})