mirror of
https://github.com/fluencelabs/js-libp2p-websockets
synced 2025-06-09 20:21:31 +00:00
test: Fix node
This commit is contained in:
parent
a19e68af68
commit
fc1ea3f89c
15
test/node.js
15
test/node.js
@ -8,7 +8,6 @@ const expect = chai.expect
|
|||||||
chai.use(dirtyChai)
|
chai.use(dirtyChai)
|
||||||
const multiaddr = require('multiaddr')
|
const multiaddr = require('multiaddr')
|
||||||
const pull = require('pull-stream')
|
const pull = require('pull-stream')
|
||||||
const goodbye = require('pull-goodbye')
|
|
||||||
|
|
||||||
const WS = require('../src')
|
const WS = require('../src')
|
||||||
const maToUrl = require('../src/ma-to-url')
|
const maToUrl = require('../src/ma-to-url')
|
||||||
@ -171,7 +170,7 @@ describe('dial', () => {
|
|||||||
it('dial on IPv4', (done) => {
|
it('dial on IPv4', (done) => {
|
||||||
const conn = ws.dial(ma)
|
const conn = ws.dial(ma)
|
||||||
|
|
||||||
const s = goodbye({
|
const s = {
|
||||||
source: pull.values([Buffer.from('hey')]),
|
source: pull.values([Buffer.from('hey')]),
|
||||||
sink: pull.collect((err, result) => {
|
sink: pull.collect((err, result) => {
|
||||||
expect(err).to.not.exist()
|
expect(err).to.not.exist()
|
||||||
@ -179,7 +178,7 @@ describe('dial', () => {
|
|||||||
expect(result).to.be.eql([Buffer.from('hey')])
|
expect(result).to.be.eql([Buffer.from('hey')])
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
})
|
}
|
||||||
|
|
||||||
pull(s, conn, s)
|
pull(s, conn, s)
|
||||||
})
|
})
|
||||||
@ -192,7 +191,7 @@ describe('dial', () => {
|
|||||||
const ma = multiaddr('/ip4/127.0.0.1/tcp/9091/ws/ipfs/Qmb6owHp6eaWArVbcJJbQSyifyJBttMMjYV76N2hMbf5Vw')
|
const ma = multiaddr('/ip4/127.0.0.1/tcp/9091/ws/ipfs/Qmb6owHp6eaWArVbcJJbQSyifyJBttMMjYV76N2hMbf5Vw')
|
||||||
const conn = ws.dial(ma)
|
const conn = ws.dial(ma)
|
||||||
|
|
||||||
const s = goodbye({
|
const s = {
|
||||||
source: pull.values([Buffer.from('hey')]),
|
source: pull.values([Buffer.from('hey')]),
|
||||||
sink: pull.collect((err, result) => {
|
sink: pull.collect((err, result) => {
|
||||||
expect(err).to.not.exist()
|
expect(err).to.not.exist()
|
||||||
@ -200,7 +199,7 @@ describe('dial', () => {
|
|||||||
expect(result).to.be.eql([Buffer.from('hey')])
|
expect(result).to.be.eql([Buffer.from('hey')])
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
})
|
}
|
||||||
|
|
||||||
pull(s, conn, s)
|
pull(s, conn, s)
|
||||||
})
|
})
|
||||||
@ -510,8 +509,6 @@ describe('ma-to-url test', function () {
|
|||||||
})
|
})
|
||||||
|
|
||||||
describe.skip('turbolence', () => {
|
describe.skip('turbolence', () => {
|
||||||
it('dialer - emits error on the other end is terminated abruptly', (done) => {
|
it('dialer - emits error on the other end is terminated abruptly', (done) => { })
|
||||||
})
|
it('listener - emits error on the other end is terminated abruptly', (done) => { })
|
||||||
it('listener - emits error on the other end is terminated abruptly', (done) => {
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user