16 lines
391 B
JavaScript
Raw Normal View History

2015-09-19 17:42:28 +01:00
var Id = require('peer-id')
2015-09-19 16:46:52 +01:00
module.exports.all = function (test, common) {
2015-09-19 17:42:28 +01:00
test('Simple findPeers test', function (t) {
2015-09-19 16:46:52 +01:00
common.setup(test, function (err, pr) {
2015-09-19 17:42:28 +01:00
t.plan(3)
2015-09-19 16:46:52 +01:00
t.ifError(err)
2015-09-19 17:42:28 +01:00
pr.findPeers(Id.create().toBytes(), function (err, peerQueue) {
t.ifError(err)
t.equal(peerQueue.length >= 1, true)
2015-09-25 12:26:19 +01:00
common.teardown()
2015-09-19 17:42:28 +01:00
})
2015-09-19 16:46:52 +01:00
})
})
}