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

Commit

Permalink
chore: apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-Authored-By: Jacob Heun <[email protected]>
  • Loading branch information
vasco-santos and jacobheun authored Apr 16, 2020
1 parent 1379eb6 commit fff9c14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/peer-discovery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ It returns a `Promise`

- `discovery.on('peer', (peerInfo) => {})`

Everytime a peer is discovered by a discovery service, it emmits a `peer` event with the discovered peer's information, which must contain the following properties:
Every time a peer is discovered by a discovery service, it emits a `peer` event with the discovered peer's information, which must contain the following properties:

- `<`[`PeerId`](https://github.com/libp2p/js-peer-id)`>` `peerInfo.id`
- `<Array<`[`Multiaddr`](https://github.com/multiformats/js-multiaddr)`>>` `peerInfo.multiaddrs`
4 changes: 2 additions & 2 deletions src/peer-discovery/tests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module.exports = (common) => {
await discovery.start()
})

it('should listen a peer event after start', async () => {
it('should emit a peer event after start', async () => {
const defer = pDefer()
await discovery.start()

Expand All @@ -59,7 +59,7 @@ module.exports = (common) => {
defer.resolve()
})

return defer.promise
await defer.promise
})

it('should not receive a peer event before start', async () => {
Expand Down

0 comments on commit fff9c14

Please sign in to comment.