diff options
Diffstat (limited to 'test/node/download-dht-torrent.js')
-rw-r--r-- | test/node/download-dht-torrent.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/node/download-dht-torrent.js b/test/node/download-dht-torrent.js index 5f88da5..20c7b0c 100644 --- a/test/node/download-dht-torrent.js +++ b/test/node/download-dht-torrent.js @@ -6,7 +6,7 @@ var test = require('tape') var WebTorrent = require('../../') test('Download using DHT (via .torrent file)', function (t) { - t.plan(8) + t.plan(9) var dhtServer = new DHT({ bootstrap: false }) @@ -26,6 +26,10 @@ test('Download using DHT (via .torrent file)', function (t) { dht: { bootstrap: '127.0.0.1:' + dhtServer.address().port } }) + client1.dht.on('listening', function () { + t.equal(client1.dhtPort, client1.dht.address().port) + }) + client1.on('error', function (err) { t.fail(err) }) client1.on('warning', function (err) { t.fail(err) }) |