git ssb

4+

Dominic / scuttlebot



Commit db370ac2170a0f2ea907514f2076114b4df0e29e

note about problem with tests

Dominic Tarr committed on 9/26/2017, 4:23:01 AM
Parent: b626e54fb122fbc24c01380a0defcf468615379f

Files changed

test/invite.jschanged
test/invite.jsView
@@ -1,4 +1,6 @@
1 +//WARNING: this test currently only passes
2 +//if the computer has a network.
13 var sbot = require('../')
24 var ssbKeys = require('ssb-keys')
35 var tape = require('tape')
46 var explain = require('explain-error')
@@ -41,8 +43,9 @@
4143
4244 alice.invite.create(1, function (err, invite) {
4345 if(err) throw err
4446 //test that invite is accepted with quotes around it.
47 + console.log('INVITE', invite)
4548 bob.invite.accept(JSON.stringify(invite), function (err) {
4649 if(err) throw err
4750 alice.friends.hops({
4851 source: alice.id, dest: bob.id
@@ -147,9 +150,8 @@
147150 alice.invite.create(1, function (err, invite) {
148151 if(err) throw err
149152
150153 // use a local ipv6 address in the invite
151-// if(/localhost/.test(invite))
152154
153155 var inviteV6
154156
155157 = invite.replace(/localhost|([0-9.]*)/, '::1')
@@ -193,8 +195,9 @@
193195 alice.invite.create({modern: true}, function (err, invite) {
194196 if(err) throw err
195197 //test that invite is accepted with quotes around it.
196198 t.ok(/^ws/.test(invite)) //should be over websockets
199 + console.log(invite)
197200 bob.invite.accept(JSON.stringify(invite), function (err, msg) {
198201 if(err) throw err
199202 alice.friends.hops({
200203 source: alice.id, dest: bob.id
@@ -202,9 +205,8 @@
202205 if(err) throw err
203206 t.equal(hops[bob.id], 1, 'alice follows bob')
204207 carol.invite.accept(invite, function (err) {
205208 t.ok(err)
206-// if(err) throw err
207209 alice.friends.hops({
208210 source: alice.id, dest: bob.id
209211 }, function (err, hops) {
210212 if(err) throw err
@@ -250,10 +252,8 @@
250252 })
251253 })
252254 })
253255 })
254-
255-
256256 })
257257
258258
259259 tape('test invite with note', function (t) {
@@ -294,5 +294,4 @@
294294 })
295295
296296
297297
298-

Built with git-ssb-web