Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2015-04-11 12:16:14 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-04-11 12:16:14 +0300
commitf622ebaa59d317ed58800a23c898c3cb8346f421 (patch)
treebad6c96dfe911e2919a26daedf37048071637f5e /test/blocklist-dht.js
parentb4ee1d4706eff6ccf8cf6b8c34f9ea424737a6f2 (diff)
fix tests to work with new bittorrent-dht
Diffstat (limited to 'test/blocklist-dht.js')
-rw-r--r--test/blocklist-dht.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/blocklist-dht.js b/test/blocklist-dht.js
index 9ddb316..bcbf03e 100644
--- a/test/blocklist-dht.js
+++ b/test/blocklist-dht.js
@@ -1,6 +1,7 @@
var auto = require('run-auto')
var DHT = require('bittorrent-dht/server')
var fs = require('fs')
+var networkAddress = require('network-address')
var parseTorrent = require('parse-torrent')
var test = require('tape')
var WebTorrent = require('../')
@@ -13,7 +14,7 @@ leavesParsed.announce = []
leavesParsed.announceList = []
test('blocklist blocks peers discovered via DHT', function (t) {
- t.plan(6)
+ t.plan(7)
var dhtServer = new DHT({ bootstrap: false })
@@ -58,7 +59,7 @@ test('blocklist blocks peers discovered via DHT', function (t) {
var client2 = new WebTorrent({
tracker: false,
dht: { bootstrap: '127.0.0.1:' + r.dhtPort },
- blocklist: [ '127.0.0.1' ]
+ blocklist: [ '127.0.0.1', networkAddress.ipv4() ]
})
client2.on('error', function (err) { t.fail(err) })
@@ -73,7 +74,7 @@ test('blocklist blocks peers discovered via DHT', function (t) {
cb(null, client2)
})
- torrent2.on('peer', function () {
+ torrent2.on('peer', function (addr) {
t.fail('client2 should not find any peers')
})
}]