diff options
Diffstat (limited to 'test/node/download-dht-torrent.js')
-rw-r--r-- | test/node/download-dht-torrent.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/node/download-dht-torrent.js b/test/node/download-dht-torrent.js index b6262c3..5f88da5 100644 --- a/test/node/download-dht-torrent.js +++ b/test/node/download-dht-torrent.js @@ -1,5 +1,5 @@ -var common = require('../common') var DHT = require('bittorrent-dht/server') +var fixtures = require('webtorrent-fixtures') var fs = require('fs') var series = require('run-series') var test = require('tape') @@ -29,7 +29,7 @@ test('Download using DHT (via .torrent file)', function (t) { client1.on('error', function (err) { t.fail(err) }) client1.on('warning', function (err) { t.fail(err) }) - var torrent = client1.add(common.leaves.parsedTorrent) + var torrent = client1.add(fixtures.leaves.parsedTorrent) torrent.on('ready', function () { // torrent metadata has been fetched -- sanity check it @@ -39,7 +39,7 @@ test('Download using DHT (via .torrent file)', function (t) { t.deepEqual(torrent.files.map(function (file) { return file.name }), names) }) - torrent.load(fs.createReadStream(common.leaves.contentPath), function (err) { + torrent.load(fs.createReadStream(fixtures.leaves.contentPath), function (err) { loaded = true maybeDone(err) }) @@ -69,7 +69,7 @@ test('Download using DHT (via .torrent file)', function (t) { torrent.files.forEach(function (file) { file.getBuffer(function (err, buf) { if (err) throw err - t.deepEqual(buf, common.leaves.content, 'downloaded correct content') + t.deepEqual(buf, fixtures.leaves.content, 'downloaded correct content') gotBuffer = true maybeDone() }) @@ -88,7 +88,7 @@ test('Download using DHT (via .torrent file)', function (t) { } }) - client2.add(common.leaves.parsedTorrent) + client2.add(fixtures.leaves.parsedTorrent) } ], function (err) { t.error(err) |