mirror of
https://github.com/fluencelabs/js-libp2p-websockets
synced 2025-04-25 11:42:39 +00:00
chore: update aegir
This commit is contained in:
parent
39ef6fc809
commit
1f86c9f7e2
11
package.json
11
package.json
@ -36,17 +36,18 @@
|
||||
},
|
||||
"homepage": "https://github.com/libp2p/js-libp2p-websockets#readme",
|
||||
"dependencies": {
|
||||
"interface-connection": "~0.3.0",
|
||||
"interface-connection": "~0.3.2",
|
||||
"lodash.includes": "^4.3.0",
|
||||
"mafmt": "^2.1.6",
|
||||
"pull-ws": "^3.2.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"aegir": "^10.0.0",
|
||||
"aegir": "^11.0.0",
|
||||
"chai": "^3.5.0",
|
||||
"dirty-chai": "^1.2.2",
|
||||
"gulp": "^3.9.1",
|
||||
"interface-transport": "~0.3.3",
|
||||
"multiaddr": "^2.2.1",
|
||||
"interface-transport": "~0.3.5",
|
||||
"multiaddr": "^2.2.2",
|
||||
"pre-commit": "^1.2.2",
|
||||
"pull-goodbye": "0.0.1",
|
||||
"pull-stream": "^3.5.0"
|
||||
@ -59,4 +60,4 @@
|
||||
"Greenkeeper <support@greenkeeper.io>",
|
||||
"Richard Littauer <richard.littauer@gmail.com>"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,11 @@
|
||||
/* eslint-env mocha */
|
||||
'use strict'
|
||||
|
||||
const expect = require('chai').expect
|
||||
const chai = require('chai')
|
||||
const dirtyChai = require('dirty-chai')
|
||||
const expect = chai.expect
|
||||
chai.use(dirtyChai)
|
||||
|
||||
const multiaddr = require('multiaddr')
|
||||
const pull = require('pull-stream')
|
||||
const goodbye = require('pull-goodbye')
|
||||
@ -15,7 +19,7 @@ describe('libp2p-websockets', () => {
|
||||
|
||||
beforeEach((done) => {
|
||||
ws = new WS()
|
||||
expect(ws).to.exist
|
||||
expect(ws).to.exist()
|
||||
conn = ws.dial(ma, done)
|
||||
})
|
||||
|
||||
@ -25,7 +29,7 @@ describe('libp2p-websockets', () => {
|
||||
const s = goodbye({
|
||||
source: pull.values([message]),
|
||||
sink: pull.collect((err, results) => {
|
||||
expect(err).to.not.exist
|
||||
expect(err).to.not.exist()
|
||||
expect(results).to.be.eql([message])
|
||||
done()
|
||||
})
|
||||
@ -41,7 +45,7 @@ describe('libp2p-websockets', () => {
|
||||
const s = goodbye({
|
||||
source: pull.values([rawMessage]),
|
||||
sink: pull.collect((err, results) => {
|
||||
expect(err).to.not.exist
|
||||
expect(err).to.not.exist()
|
||||
expect(results).to.be.eql([rawMessage])
|
||||
done()
|
||||
})
|
||||
@ -57,7 +61,7 @@ describe('libp2p-websockets', () => {
|
||||
pull.map((val) => Buffer(val.toString()))
|
||||
),
|
||||
sink: pull.collect((err, result) => {
|
||||
expect(err).to.not.exist
|
||||
expect(err).to.not.exist()
|
||||
expect(result).to.have.length(1000)
|
||||
done()
|
||||
})
|
||||
|
33
test/node.js
33
test/node.js
@ -1,7 +1,10 @@
|
||||
/* eslint-env mocha */
|
||||
'use strict'
|
||||
|
||||
const expect = require('chai').expect
|
||||
const chai = require('chai')
|
||||
const dirtyChai = require('dirty-chai')
|
||||
const expect = chai.expect
|
||||
chai.use(dirtyChai)
|
||||
const multiaddr = require('multiaddr')
|
||||
const pull = require('pull-stream')
|
||||
const goodbye = require('pull-goodbye')
|
||||
@ -13,7 +16,7 @@ require('./compliance.node')
|
||||
describe('instantiate the transport', () => {
|
||||
it('create', () => {
|
||||
const ws = new WS()
|
||||
expect(ws).to.exist
|
||||
expect(ws).to.exist()
|
||||
})
|
||||
})
|
||||
|
||||
@ -77,7 +80,7 @@ describe('listen', () => {
|
||||
const listener = ws.createListener((conn) => {})
|
||||
listener.listen(ma, () => {
|
||||
listener.getAddrs((err, addrs) => {
|
||||
expect(err).to.not.exist
|
||||
expect(err).to.not.exist()
|
||||
expect(addrs.length).to.equal(1)
|
||||
expect(addrs[0]).to.deep.equal(ma)
|
||||
listener.close(done)
|
||||
@ -103,7 +106,7 @@ describe('listen', () => {
|
||||
const listener = ws.createListener((conn) => {})
|
||||
listener.listen(ma, () => {
|
||||
listener.getAddrs((err, addrs) => {
|
||||
expect(err).to.not.exist
|
||||
expect(err).to.not.exist()
|
||||
expect(addrs.length).to.equal(1)
|
||||
expect(addrs[0]).to.deep.equal(ma)
|
||||
listener.close(done)
|
||||
@ -135,7 +138,7 @@ describe('dial', () => {
|
||||
const s = goodbye({
|
||||
source: pull.values(['hey']),
|
||||
sink: pull.collect((err, result) => {
|
||||
expect(err).to.not.exist
|
||||
expect(err).to.not.exist()
|
||||
|
||||
expect(result).to.be.eql(['hey'])
|
||||
done()
|
||||
@ -156,7 +159,7 @@ describe('dial', () => {
|
||||
const s = goodbye({
|
||||
source: pull.values(['hey']),
|
||||
sink: pull.collect((err, result) => {
|
||||
expect(err).to.not.exist
|
||||
expect(err).to.not.exist()
|
||||
|
||||
expect(result).to.be.eql(['hey'])
|
||||
done()
|
||||
@ -207,10 +210,10 @@ describe('valid Connection', () => {
|
||||
const ws = new WS()
|
||||
|
||||
const listener = ws.createListener((conn) => {
|
||||
expect(conn).to.exist
|
||||
expect(conn).to.exist()
|
||||
|
||||
conn.getObservedAddrs((err, addrs) => {
|
||||
expect(err).to.not.exist
|
||||
expect(err).to.not.exist()
|
||||
dialerObsAddrs = addrs
|
||||
})
|
||||
|
||||
@ -228,7 +231,7 @@ describe('valid Connection', () => {
|
||||
|
||||
function onEnd () {
|
||||
conn.getObservedAddrs((err, addrs) => {
|
||||
expect(err).to.not.exist
|
||||
expect(err).to.not.exist()
|
||||
listenerObsAddrs = addrs
|
||||
|
||||
listener.close(onClose)
|
||||
@ -246,10 +249,10 @@ describe('valid Connection', () => {
|
||||
const ws = new WS()
|
||||
|
||||
const listener = ws.createListener((conn) => {
|
||||
expect(conn).to.exist
|
||||
expect(conn).to.exist()
|
||||
|
||||
conn.getPeerInfo((err, peerInfo) => {
|
||||
expect(err).to.exist
|
||||
expect(err).to.exist()
|
||||
})
|
||||
|
||||
pull(conn, conn)
|
||||
@ -266,7 +269,7 @@ describe('valid Connection', () => {
|
||||
|
||||
function onEnd () {
|
||||
conn.getPeerInfo((err, peerInfo) => {
|
||||
expect(err).to.exit
|
||||
expect(err).to.exist()
|
||||
listener.close(done)
|
||||
})
|
||||
}
|
||||
@ -277,11 +280,11 @@ describe('valid Connection', () => {
|
||||
const ws = new WS()
|
||||
|
||||
const listener = ws.createListener((conn) => {
|
||||
expect(conn).to.exist
|
||||
expect(conn).to.exist()
|
||||
conn.setPeerInfo('a')
|
||||
|
||||
conn.getPeerInfo((err, peerInfo) => {
|
||||
expect(err).to.not.exist
|
||||
expect(err).to.not.exist()
|
||||
expect(peerInfo).to.equal('a')
|
||||
})
|
||||
|
||||
@ -301,7 +304,7 @@ describe('valid Connection', () => {
|
||||
|
||||
function onEnd () {
|
||||
conn.getPeerInfo((err, peerInfo) => {
|
||||
expect(err).to.not.exist
|
||||
expect(err).to.not.exist()
|
||||
expect(peerInfo).to.equal('b')
|
||||
listener.close(done)
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user