diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2015-04-11 12:16:14 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2015-04-11 12:16:14 +0300 |
commit | f622ebaa59d317ed58800a23c898c3cb8346f421 (patch) | |
tree | bad6c96dfe911e2919a26daedf37048071637f5e /test/blocklist-dht.js | |
parent | b4ee1d4706eff6ccf8cf6b8c34f9ea424737a6f2 (diff) |
fix tests to work with new bittorrent-dht
Diffstat (limited to 'test/blocklist-dht.js')
-rw-r--r-- | test/blocklist-dht.js | 7 |
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') }) }] |