You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`waitForPeers`, a test helper, currently checks that the *number* of
connected peers is expected. This has two problems:
- If the number of connected peers is *more than needed*, it will never
resolve.
- If the *number* of connected peers is correct but the actual peers are
different, the promise could resolve prematurely.
This snippet highlights the problem:
```javascript
const managers = await createManagers(3, t)
const [a, b, c] = managers
connectPeers(managers)
await waitForPeers([a, c])
```
I think this is a useful change on its own, but will also make [an
upcoming change][0] easier.
[0]: #865
0 commit comments