Skip to content
This repository was archived by the owner on Jun 26, 2023. It is now read-only.

Commit 215282a

Browse files
committed
chore: address review
1 parent 7bb5448 commit 215282a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"libp2p-tcp": "^0.14.1",
4747
"multiaddr": "^7.1.0",
4848
"p-limit": "^2.2.1",
49+
"p-wait-for": "^3.1.0",
4950
"peer-id": "^0.13.3",
5051
"sinon": "^7.5.0",
5152
"streaming-iterables": "^4.1.0"

src/transport/tests/listen-test.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const expect = chai.expect
88
chai.use(dirtyChai)
99
const sinon = require('sinon')
1010

11+
const pWaitFor = require('p-wait-for')
1112
const pipe = require('it-pipe')
1213
const { isValidTick } = require('./utils')
1314

@@ -105,7 +106,7 @@ module.exports = (common) => {
105106
// Create a connection to the listener
106107
const socket = await transport.dial(addrs[0])
107108

108-
await socket.close()
109+
await pWaitFor(() => typeof socket.timeline.close === 'number')
109110
await listener.close()
110111
})
111112

0 commit comments

Comments
 (0)