From 3d14678de80c439d1469a5f1a6098adf4efc8ff3 Mon Sep 17 00:00:00 2001 From: Jacob Heun Date: Thu, 15 Oct 2020 16:29:33 +0200 Subject: [PATCH] chore: fix lint --- src/connection/connection.js | 2 +- src/stream-muxer/tests/close-test.js | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/connection/connection.js b/src/connection/connection.js index 2127117..980bad0 100644 --- a/src/connection/connection.js +++ b/src/connection/connection.js @@ -210,7 +210,7 @@ class Connection { */ async close () { this.streams.map(s => s.close && s.close()) - + if (this.stat.status === Status.CLOSED) { return } diff --git a/src/stream-muxer/tests/close-test.js b/src/stream-muxer/tests/close-test.js index 993a973..9893e98 100644 --- a/src/stream-muxer/tests/close-test.js +++ b/src/stream-muxer/tests/close-test.js @@ -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) - })() + })() }) }) }