Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: be more exact when waiting for peers (#866)
`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
- Loading branch information