test that streams emit end
This commit is contained in:
parent
2a1b1e9d99
commit
2fee69b72e
1 changed files with 7 additions and 1 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue