This commit is contained in:
David Dias 2015-09-19 17:42:28 +01:00
parent f15b452d34
commit 471f2ad758
3 changed files with 11 additions and 3 deletions

View File

@ -27,7 +27,7 @@ Include this badge in your readme if you make a module that is compatible with t
```
var tape = require('tape')
var tests = require('abstract-record-store/tests')
var tests = require('abstract-peer-routing/tests')
var YourPeerRouter = require('../src')
var common = {

View File

@ -17,6 +17,7 @@
"homepage": "https://github.com/diasdavid/abstract-peer-routing",
"devDependencies": {},
"dependencies": {
"peer-id": "^0.3.3",
"timed-tape": "^0.1.0"
}
}

View File

@ -1,8 +1,15 @@
var Id = require('peer-id')
module.exports.all = function (test, common) {
test('a test', function (t) {
test('Simple findPeers test', function (t) {
common.setup(test, function (err, pr) {
t.plan(1)
t.plan(3)
t.ifError(err)
pr.findPeers(Id.create().toBytes(), function (err, peerQueue) {
t.ifError(err)
t.equal(peerQueue.length >= 1, true)
// common.teardown()
})
})
})
}