Skip to content
This repository has been archived by the owner on Mar 11, 2020. It is now read-only.

refactor: async #10

Merged
merged 2 commits into from
Sep 27, 2019
Merged

refactor: async #10

merged 2 commits into from
Sep 27, 2019

Conversation

vasco-santos
Copy link
Member

@vasco-santos vasco-santos commented Sep 26, 2019

Updated API for async and added a naive suite of tests.

This test suite should be enhanced afterward.

Needed on:

@vasco-santos
Copy link
Member Author

Copy link
Contributor

@jacobheun jacobheun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to add a basic discovery module here and run the test suite on it, to ensure its working properly without checking other modules. Similar to https://github.com/libp2p/interface-connection/blob/refactor/async/test/compliance.spec.js. It will be super basic right now, but useful nonetheless.

it('should not fail to start the service if it is already started', async () => {
await discovery.start()
await discovery.start()
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

discovery.on and discovery.removeListener should get added as well, but those can wait until we add a proper test suite here, since they'll get tested as a part of that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yap, I plan to add them in a next step, once we are working more closely with all the other peer discovery protocols.

Things are slightly different for each of them, and I need to have a better context on all of them to create a generic test setup for all. This way, I think we can start with this for the *-star, and then upgrade them once we get into dht and mdns ones

Copy link
Contributor

@jacobheun jacobheun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 minor thing for release scripts, otherwise this looks good!

package.json Outdated Show resolved Hide resolved
@vasco-santos vasco-santos merged commit 9a30487 into master Sep 27, 2019
@vasco-santos vasco-santos deleted the refactor/async branch September 27, 2019 10:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants