git ssb

4+

Dominic / scuttlebot



Commit 80a0cae5ef85d02465ff1390a3c475d47c774ee2

Adds test

Piet Geursen committed on 3/12/2018, 9:22:53 PM
Parent: e57888ea1a72b0794a18a2b6f081e8c51bfffe80

Files changed

test/createMultipleServers.jsadded
test/createMultipleServers.jsView
@@ -1,0 +1,24 @@
1 +var tape = require('tape')
2 +
3 +tape('existing api will throw if trying to create multiple servers with the same plugin', function (t) {
4 + require('../')
5 + .use(require('../plugins/replicate'))
6 + t.throws(() => {
7 + require('../')
8 + .use(require('../plugins/replicate'))
9 + .use(require('../plugins/gossip'))
10 + })
11 + t.end()
12 +})
13 +
14 +tape('createSbot method allows creating multiple servers with the same plugins', function (t) {
15 + var createSbot = require('../').createSbot
16 +
17 + var sbot1 = createSbot()
18 + .use(require('../plugins/replicate'))
19 + var sbot2 = createSbot()
20 + .use(require('../plugins/replicate'))
21 + .use(require('../plugins/gossip'))
22 + t.pass()
23 + t.end()
24 +})

Built with git-ssb-web