mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-28 08:21:33 +00:00
Update libp2p-websockets and add test for callback's conn
This commit is contained in:
@ -34,7 +34,7 @@
|
||||
"istanbul": "^0.4.2",
|
||||
"libp2p-spdy": "^0.2.3",
|
||||
"libp2p-tcp": "^0.4.0",
|
||||
"libp2p-websockets": "^0.2.0",
|
||||
"libp2p-websockets": "^0.2.1",
|
||||
"mocha": "^2.4.5",
|
||||
"multiaddr": "^1.3.0",
|
||||
"peer-id": "^0.6.0",
|
||||
|
@ -232,6 +232,19 @@ describe('transport - websockets', function () {
|
||||
conn.end()
|
||||
})
|
||||
|
||||
it('dial (conn from callback)', (done) => {
|
||||
swarmA.transport.dial('ws', multiaddr('/ip4/127.0.0.1/tcp/9999/websockets'), (err, conn) => {
|
||||
expect(err).to.not.exist
|
||||
|
||||
conn.pipe(bl((err, data) => {
|
||||
expect(err).to.not.exist
|
||||
done()
|
||||
}))
|
||||
conn.write('hey')
|
||||
conn.end()
|
||||
})
|
||||
})
|
||||
|
||||
it('close', (done) => {
|
||||
var count = 0
|
||||
swarmA.transport.close('ws', closed)
|
||||
|
Reference in New Issue
Block a user