From d6376377d336da290350acc4d4898fdec18dea9c Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Mon, 17 Aug 2020 18:10:55 +0200 Subject: [PATCH] docs: update discovery tests usage (#61) --- src/peer-discovery/README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/peer-discovery/README.md b/src/peer-discovery/README.md index f66b0ba..837ece1 100644 --- a/src/peer-discovery/README.md +++ b/src/peer-discovery/README.md @@ -33,19 +33,19 @@ Include this badge in your readme if you make a new module that uses interface-p Install `interface-discovery` as one of the dependencies of your project and as a test file. Then, using `mocha` (for JavaScript) or a test runner with compatible API, do: ```js -const test = require('interface-discovery') +const tests = require('libp2p-interfaces/src/peer-discovery/tests') -const common = { - setup () { - return YourDiscovery - }, - teardown () { - // Clean up any resources created by setup() - } -} - -// use all of the test suits -test(common) +describe('your discovery', () => { + // use all of the test suits + tests({ + setup () { + return YourDiscovery + }, + teardown () { + // Clean up any resources created by setup() + } + }) +}) ``` ## API