Swap-Aggregator-Subgraph/node_modules/pull-stream/test/through.js
Richa-iitr d211083153 Revert "Revert "added handler""
This reverts commit c36ee8c5ca.
2022-07-03 07:30:05 +05:30

22 lines
383 B
JavaScript

var pull = require('../')
require('tape')('through - onEnd', function (t) {
t.plan(2)
pull(
pull.infinite(),
pull.through(null, function (err) {
console.log('end')
t.ok(true)
process.nextTick(function () {
t.end()
})
}),
pull.take(10),
pull.collect(function (err, ary) {
console.log(ary)
t.ok(true)
})
)
})