diff options
Diffstat (limited to 'deps/npm/node_modules/tar/node_modules/minipass/test/empty-end.js')
-rw-r--r-- | deps/npm/node_modules/tar/node_modules/minipass/test/empty-end.js | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/deps/npm/node_modules/tar/node_modules/minipass/test/empty-end.js b/deps/npm/node_modules/tar/node_modules/minipass/test/empty-end.js deleted file mode 100644 index 42387d51af..0000000000 --- a/deps/npm/node_modules/tar/node_modules/minipass/test/empty-end.js +++ /dev/null @@ -1,38 +0,0 @@ -const t = require('tap') -const MP = require('../') - -t.test('emit end on resume', async t => { - const list = [] - const mp = new MP() - mp.on('end', _ => list.push('end')) - mp.end() - t.notOk(mp.emittedEnd) - list.push('called end') - mp.resume() - t.ok(mp.emittedEnd) - list.push('called resume') - t.same(list, ['called end', 'end', 'called resume']) -}) - -t.test('emit end on read()', async t => { - const list = [] - const mp = new MP() - mp.on('end', _ => list.push('end')) - mp.end() - list.push('called end') - - mp.read() - list.push('called read()') - t.same(list, ['called end', 'end', 'called read()']) -}) - -t.test('emit end on data handler', async t => { - const list = [] - const mp = new MP() - mp.on('end', _ => list.push('end')) - mp.end() - list.push('called end') - mp.on('data', _=>_) - list.push('added data handler') - t.same(list, ['called end', 'end', 'added data handler']) -}) |