mirror of
https://github.com/fluencelabs/js-libp2p-interfaces
synced 2025-04-24 17:52:21 +00:00
chore: fix lint
This commit is contained in:
parent
d7e113b3db
commit
3d14678de8
@ -210,7 +210,7 @@ class Connection {
|
||||
*/
|
||||
async close () {
|
||||
this.streams.map(s => s.close && s.close())
|
||||
|
||||
|
||||
if (this.stat.status === Status.CLOSED) {
|
||||
return
|
||||
}
|
||||
|
@ -122,14 +122,14 @@ module.exports = (common) => {
|
||||
const listener = new Muxer(async stream => {
|
||||
// Immediate close for write
|
||||
await stream.closeWrite()
|
||||
|
||||
|
||||
const results = await pipe(stream, async (source) => {
|
||||
const data = []
|
||||
for await (const chunk of source) {
|
||||
data.push(chunk.slice())
|
||||
}
|
||||
return data
|
||||
})
|
||||
})
|
||||
expect(results).to.eql(data)
|
||||
|
||||
try {
|
||||
@ -160,7 +160,7 @@ module.exports = (common) => {
|
||||
data.push(chunk.slice())
|
||||
}
|
||||
return data
|
||||
})
|
||||
})
|
||||
expect(results).to.eql(data)
|
||||
done()
|
||||
})
|
||||
@ -168,14 +168,14 @@ module.exports = (common) => {
|
||||
pipe(p[0], dialer, p[0])
|
||||
pipe(p[1], listener, p[1])
|
||||
|
||||
const stream = dialer.newStream()
|
||||
stream.closeRead()
|
||||
const stream = dialer.newStream()
|
||||
stream.closeRead()
|
||||
|
||||
// Source should be done
|
||||
;(async () => {
|
||||
expect(await stream.source.next()).to.eql({ done: true })
|
||||
expect(await stream.source.next()).to.eql({ done: true })
|
||||
stream.sink(data)
|
||||
})()
|
||||
})()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user