feat: update to the latest switch (#336)

This commit is contained in:
Jacob Heun
2019-03-21 14:23:00 +01:00
committed by GitHub
parent e52ce66ab7
commit eee60ed37d
3 changed files with 26 additions and 27 deletions

View File

@ -326,10 +326,10 @@ describe('stream muxing', () => {
expect(Object.keys(nodeA._switch.muxers)).to.have.length(1)
expect(Object.keys(nodeB._switch.muxers)).to.have.length(1)
nodeA.dial(nodeB.peerInfo, (err) => {
nodeA.dialFSM(nodeB.peerInfo, (err, connFSM) => {
expect(err).to.not.exist()
expect(nodeA._switch.connection.getAll()).to.have.length(0)
cb()
// The connection should fall back to 'unmuxed'
connFSM.once('unmuxed', () => cb())
})
},
(cb) => teardown(nodeA, nodeB, cb)