git ssb

0+

cel / pull-reverse



Tree: c35743ecbec8f9c5790187a9d319e9e2ef622684

Files: c35743ecbec8f9c5790187a9d319e9e2ef622684 / test.js

458 bytesRaw
1var test = require('tape')
2var reverse = require('.')
3var pull = require('pull-stream')
4
5var vals = [1,2,3,4,5,4,'foo',null,Object()]
6
7test('reverse', function (t) {
8 var reverseCache = reverse(pull.values(vals))
9 t.test('1', doIt)
10 t.test('2', doIt)
11 function doIt(t) {
12 pull(reverseCache(), pull.collect(function (err, values) {
13 t.error(err, 'collect')
14 t.deepEquals(values.reverse(), vals, 'values reverse')
15 t.end()
16 }))
17 }
18})
19

Built with git-ssb-web