git ssb

1+

Dominic / offset-log



Commit 80d7927483419652e9ccfa9d67202ee1d7f6e7db

tidy tests

Dominic Tarr committed on 10/22/2016, 10:38:20 PM
Parent: 6524aa00b6739b51cda65822bc3d3f80ab7f8801

Files changed

test/simple.jschanged
test/stream.jschanged
test/simple.jsView
@@ -75,9 +75,8 @@
7575
7676 pull(
7777 db.stream({min: 0, keys: false}),
7878 pull.collect(function (err, ary) {
79- console.log("COLLECT", ary)
8079 t.deepEqual(ary.map(String), ['hello world', 'hello offset db'])
8180 t.end()
8281 })
8382 )
@@ -97,9 +96,9 @@
9796 t.end()
9897 })
9998 )
10099 })
101-return
100 +
102101 tape('append batch', function (t) {
103102 var file = '/tmp/offset-test_2_'+Date.now()+'.log'
104103 var db = Offset(file, 16)
105104
@@ -108,9 +107,8 @@
108107 new Buffer('hello offset db'),
109108 ], function (err, offsets) {
110109 if(err) throw err
111110 t.deepEqual(offsets, [0, 19])
112- console.log('OFFSETS', offsets)
113111 t.end()
114112 })
115113
116114 })
@@ -180,4 +178,7 @@
180178 })
181179
182180
183181
182 +
183 +
184 +
test/stream.jsView
@@ -48,11 +48,8 @@
4848 }
4949
5050 pull(
5151 log.stream({live: true, keys: true, values: true, sync: false}),
52- pull.through(function (v) {
53- console.log('STREAM', v.key, v.value, v.value.toString())
54- }),
5552 pull.map(function (data) {
5653 if(data.sync) return data
5754 return {key: data.key, value: decode(data.value)}
5855 }),
@@ -64,4 +61,5 @@
6461
6562
6663
6764
65 +

Built with git-ssb-web