From 2fee69b72e72ec70cabcd90970a27571606bcd0f Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Sat, 17 Jun 2023 19:15:07 +0200 Subject: [PATCH] test that streams emit end --- test/extract.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/extract.js b/test/extract.js index d4b6604..26d20e7 100644 --- a/test/extract.js +++ b/test/extract.js @@ -251,7 +251,7 @@ test('pax', function (t) { }) test('types', function (t) { - t.plan(3) + t.plan(5) const extract = tar.extract() let noEntries = false @@ -283,6 +283,9 @@ test('types', function (t) { stream.on('data', function () { t.ok(false) }) + stream.on('end', function () { + t.pass('ended') + }) extract.once('entry', onlink) cb() } @@ -306,6 +309,9 @@ test('types', function (t) { stream.on('data', function () { t.ok(false) }) + stream.on('end', function () { + t.pass('ended') + }) noEntries = true cb() }