Commit 62eb750647d7445ec220135de7f1f5fb1bbadd26
ssb-friends module is depends on replicate being loaded first
Dominic Tarr committed on 6/1/2017, 3:59:20 AMParent: 99c7f955e26533d822a8fcbc4c19c433a3961737
Files changed
test/block.js | changed |
test/block2.js | changed |
test/block3.js | changed |
test/caps.js | changed |
test/friends.js | changed |
test/gossip.js | changed |
test/invite.js | changed |
test/random.js | changed |
test/realtime.js | changed |
test/server.js | changed |
test/block.js | ||
---|---|---|
@@ -4,10 +4,10 @@ | ||
4 | 4 | var ssbKeys = require('ssb-keys') |
5 | 5 | var u = require('./util') |
6 | 6 | |
7 | 7 | var createSbot = require('../') |
8 | + .use(require('../plugins/replicate')) | |
8 | 9 | .use(require('ssb-friends')) |
9 | - .use(require('../plugins/replicate')) | |
10 | 10 | |
11 | 11 | var toAddress = require('../lib/util').toAddress |
12 | 12 | |
13 | 13 | function once (fn) { |
@@ -256,4 +256,7 @@ | ||
256 | 256 | |
257 | 257 | |
258 | 258 | |
259 | 259 | |
260 | + | |
261 | + | |
262 | + |
test/block2.js | ||
---|---|---|
@@ -4,10 +4,10 @@ | ||
4 | 4 | var ssbKeys = require('ssb-keys') |
5 | 5 | var u = require('./util') |
6 | 6 | |
7 | 7 | var createSbot = require('../') |
8 | + .use(require('../plugins/replicate')) | |
8 | 9 | .use(require('ssb-friends')) |
9 | - .use(require('../plugins/replicate')) | |
10 | 10 | |
11 | 11 | var alice = createSbot({ |
12 | 12 | temp: 'test-block-alice', //timeout: 1400, |
13 | 13 | keys: ssbKeys.generate() |
@@ -57,4 +57,5 @@ | ||
57 | 57 | }) |
58 | 58 | }) |
59 | 59 | |
60 | 60 | |
61 | + |
test/block3.js | ||
---|---|---|
@@ -17,10 +17,10 @@ | ||
17 | 17 | // 2. alice never tries to connect to bob. (removed from peers) |
18 | 18 | // 3. carol will not give bob any, she will not give him any data from alice. |
19 | 19 | |
20 | 20 | var createSbot = require('../') |
21 | + .use(require('../plugins/replicate')) | |
21 | 22 | .use(require('ssb-friends')) |
22 | - .use(require('../plugins/replicate')) | |
23 | 23 | |
24 | 24 | var alice = createSbot({ |
25 | 25 | temp: 'test-block-alice', timeout: 1000, |
26 | 26 | keys: ssbKeys.generate() |
@@ -81,4 +81,5 @@ | ||
81 | 81 | }) |
82 | 82 | |
83 | 83 | |
84 | 84 | |
85 | + |
test/caps.js | ||
---|---|---|
@@ -11,10 +11,10 @@ | ||
11 | 11 | // give them all pub servers (on localhost) |
12 | 12 | // and get them to follow each other... |
13 | 13 | |
14 | 14 | var createSbot = require('../') |
15 | + .use(require('../plugins/replicate')) | |
15 | 16 | .use(require('ssb-friends')) |
16 | - .use(require('../plugins/replicate')) | |
17 | 17 | .use(require('../plugins/gossip')) |
18 | 18 | .use(require('../plugins/logging')) |
19 | 19 | |
20 | 20 | var createHash = require('crypto').createHash |
@@ -110,4 +110,5 @@ | ||
110 | 110 | dbC.close() |
111 | 111 | t.end() |
112 | 112 | }) |
113 | 113 | |
114 | + |
test/friends.js | ||
---|---|---|
@@ -10,8 +10,9 @@ | ||
10 | 10 | // add some of friend edges (follow, flag) |
11 | 11 | // make sure the friends plugin analyzes correctly |
12 | 12 | |
13 | 13 | var createSbot = require('../') |
14 | + .use(require('../plugins/replicate')) | |
14 | 15 | .use(require('ssb-friends')) |
15 | 16 | |
16 | 17 | |
17 | 18 | function sort (ary) { |
test/gossip.js | ||
---|---|---|
@@ -8,9 +8,9 @@ | ||
8 | 8 | var u = require('./util') |
9 | 9 | var isArray = Array.isArray |
10 | 10 | |
11 | 11 | var createSbot = require('../') |
12 | - .use(require('ssb-friends')) | |
12 | +// .use(require('ssb-friends')) | |
13 | 13 | .use(require('../plugins/gossip')) |
14 | 14 | // .use(require('../plugins/logging')) |
15 | 15 | |
16 | 16 |
test/invite.js | ||
---|---|---|
@@ -9,8 +9,10 @@ | ||
9 | 9 | |
10 | 10 | var createSbot = require('../') |
11 | 11 | .use(require('../plugins/master')) |
12 | 12 | .use(require('../plugins/invite')) |
13 | + .use(require('../plugins/replicate')) | |
14 | + | |
13 | 15 | .use(require('ssb-friends')) |
14 | 16 | .use(require('ssb-ws')) |
15 | 17 | |
16 | 18 | function all(stream, cb) { |
@@ -292,4 +294,5 @@ | ||
292 | 294 | }) |
293 | 295 | |
294 | 296 | |
295 | 297 | |
298 | + |
test/random.js | ||
---|---|---|
@@ -36,10 +36,10 @@ | ||
36 | 36 | } |
37 | 37 | } |
38 | 38 | |
39 | 39 | var createSbot = require('../') |
40 | + .use(require('../plugins/replicate')) | |
40 | 41 | .use(require('ssb-friends')) |
41 | - .use(require('../plugins/replicate')) | |
42 | 42 | .use(require('../plugins/gossip')) |
43 | 43 | |
44 | 44 | function generateAnimals (sbot, feed, f, n, cb) { |
45 | 45 | var a = [feed] |
@@ -292,4 +292,5 @@ | ||
292 | 292 | animalNetwork.close(true) |
293 | 293 | t.end() |
294 | 294 | }) |
295 | 295 | |
296 | + |
test/realtime.js | ||
---|---|---|
@@ -6,10 +6,10 @@ | ||
6 | 6 | |
7 | 7 | var ssbKeys = require('ssb-keys') |
8 | 8 | |
9 | 9 | var createSbot = require('../') |
10 | + .use(require('../plugins/replicate')) | |
10 | 11 | .use(require('ssb-friends')) |
11 | - .use(require('../plugins/replicate')) | |
12 | 12 | |
13 | 13 | tape('replicate between 3 peers', function (t) { |
14 | 14 | |
15 | 15 | var bob = createSbot({ |
@@ -68,4 +68,5 @@ | ||
68 | 68 | |
69 | 69 | }) |
70 | 70 | }) |
71 | 71 | |
72 | + |
test/server.js | ||
---|---|---|
@@ -11,10 +11,10 @@ | ||
11 | 11 | // give them all pub servers (on localhost) |
12 | 12 | // and get them to follow each other... |
13 | 13 | |
14 | 14 | var createSbot = require('../') |
15 | + .use(require('../plugins/replicate')) | |
15 | 16 | .use(require('ssb-friends')) |
16 | - .use(require('../plugins/replicate')) | |
17 | 17 | .use(require('../plugins/gossip')) |
18 | 18 | .use(require('../plugins/logging')) |
19 | 19 | |
20 | 20 | tape('replicate between 3 peers', function (t) { |
@@ -92,4 +92,5 @@ | ||
92 | 92 | |
93 | 93 | |
94 | 94 | |
95 | 95 | |
96 | + |
Built with git-ssb-web