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
path: root/test
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2016-01-10 20:10:56 +0300
committerFeross Aboukhadijeh <feross@feross.org>2016-01-11 02:09:00 +0300
commitae604e8ba99126410fbdee08ca0bc181fd5e26c8 (patch)
tree6c6da6e7e1b71b7a40bea7983ee22eb7e5ac1740 /test
parente2ed17c571a7bc9879725fa9b4f5e152b4f019d0 (diff)
support calling torrent.load() before 'ready' event
Diffstat (limited to 'test')
-rw-r--r--test/node/download-dht-magnet.js10
-rw-r--r--test/node/download-dht-torrent.js8
2 files changed, 9 insertions, 9 deletions
diff --git a/test/node/download-dht-magnet.js b/test/node/download-dht-magnet.js
index d5849f0..eb2e56d 100644
--- a/test/node/download-dht-magnet.js
+++ b/test/node/download-dht-magnet.js
@@ -45,12 +45,12 @@ test('Download using DHT (via magnet uri)', function (t) {
var names = [ 'Leaves of Grass by Walt Whitman.epub' ]
t.deepEqual(torrent.files.map(function (file) { return file.name }), names)
+ })
- torrent.load(fs.createReadStream(common.leaves.contentPath), function (err) {
- t.error(err)
- loaded = true
- maybeDone()
- })
+ torrent.load(fs.createReadStream(common.leaves.contentPath), function (err) {
+ t.error(err)
+ loaded = true
+ maybeDone()
})
var announced = false
diff --git a/test/node/download-dht-torrent.js b/test/node/download-dht-torrent.js
index 0963fca..fc918bd 100644
--- a/test/node/download-dht-torrent.js
+++ b/test/node/download-dht-torrent.js
@@ -37,11 +37,11 @@ test('Download using DHT (via .torrent file)', function (t) {
var names = [ 'Leaves of Grass by Walt Whitman.epub' ]
t.deepEqual(torrent.files.map(function (file) { return file.name }), names)
+ })
- torrent.load(fs.createReadStream(common.leaves.contentPath), function (err) {
- loaded = true
- maybeDone(err)
- })
+ torrent.load(fs.createReadStream(common.leaves.contentPath), function (err) {
+ loaded = true
+ maybeDone(err)
})
torrent.on('dhtAnnounce', function () {