Merge pull request #16 from libp2p/greenkeeper-update-all

Update all dependencies 🌴
This commit is contained in:
David Dias 2016-08-29 16:41:53 +01:00 committed by GitHub
commit 7870911542
2 changed files with 16 additions and 9 deletions

View File

@ -43,7 +43,7 @@
"simple-websocket-server": "^0.1.4"
},
"devDependencies": {
"aegir": "^4.0.0",
"aegir": "^6.0.0",
"multiaddr": "^2.0.2",
"chai": "^3.5.0",
"gulp": "^3.9.1",

View File

@ -210,18 +210,22 @@ describe('valid Connection', () => {
listener.listen(ma, () => {
const conn = ws.dial(ma)
conn.on('end', () => {
conn.on('end', onEnd)
function onEnd () {
conn.getObservedAddrs((err, addrs) => {
expect(err).to.not.exist
listenerObsAddrs = addrs
listener.close(() => {
listener.close(onClose)
function onClose () {
expect(listenerObsAddrs[0]).to.deep.equal(ma)
expect(dialerObsAddrs.length).to.equal(0)
done()
})
}
})
})
}
conn.resume()
conn.end()
})
@ -243,12 +247,14 @@ describe('valid Connection', () => {
listener.listen(ma, () => {
const conn = ws.dial(ma)
conn.on('end', () => {
conn.on('end', onEnd)
function onEnd () {
conn.getPeerInfo((err, peerInfo) => {
expect(err).to.exit
listener.close(done)
})
})
}
conn.resume()
conn.end()
})
@ -269,7 +275,8 @@ describe('valid Connection', () => {
conn.pipe(conn)
})
listener.listen(ma, () => {
listener.listen(ma, onListen)
function onListen () {
const conn = ws.dial(ma)
conn.setPeerInfo('b')
@ -282,7 +289,7 @@ describe('valid Connection', () => {
})
conn.resume()
conn.end()
})
}
})
})