git ssb

0+

cel / pull-git-remote-helper



Tree: bdba6f9c69ed12a05f539cda2155bae439a07a78

Files: bdba6f9c69ed12a05f539cda2155bae439a07a78 / test / index-pack.js

677 bytesRaw
1var tape = require('tape')
2var indexPack = require('../lib/index-pack')
3var pull = require('pull-stream')
4var toPull = require('stream-to-pull-stream')
5var cp = require('child_process')
6
7tape('index-pack produces output', function (t) {
8 var child = cp.spawn('git', ['pack-objects', '--stdout', '--revs'])
9 child.stdin.end('HEAD\n')
10 indexPack(toPull.source(child.stdout), function (err, idx) {
11 t.error(err, 'index pack')
12 pull(idx, pull.reduce(function (val, buf) {
13 return val + buf.length
14 }, 0, function (err, length) {
15 t.error(err, 'read index pack')
16 t.comment('len: ' + length)
17 t.ok(length > 0, 'length')
18 t.end()
19 }))
20 })
21})
22

Built with git-ssb-web