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>2015-08-22 18:35:02 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-08-22 18:35:02 +0300
commita14123fa14f78615d80a6bfd70b0cd91ef11ac13 (patch)
tree667892e4d2a0e13383995c389817d5ab8141cd7a /test
parent384b442f66d94e8e01eee499f69141727c925840 (diff)
BREAKING: rename `torrent.storage` to `torrent.store`
Diffstat (limited to 'test')
-rw-r--r--test/download-dht-magnet.js6
-rw-r--r--test/download-dht-torrent.js7
2 files changed, 7 insertions, 6 deletions
diff --git a/test/download-dht-magnet.js b/test/download-dht-magnet.js
index 93e9534..b1c6a7a 100644
--- a/test/download-dht-magnet.js
+++ b/test/download-dht-magnet.js
@@ -38,9 +38,9 @@ test('Download using DHT (via magnet uri)', function (t) {
client1.on('warning', function (err) { t.fail(err) })
var announced = false
- var wroteStorage = false
+ var loaded = false
function maybeDone () {
- if (announced && wroteStorage) cb(null, client1)
+ if (announced && loaded) cb(null, client1)
}
client1.add(leavesParsed, function (torrent) {
@@ -57,7 +57,7 @@ test('Download using DHT (via magnet uri)', function (t) {
torrent.load(fs.createReadStream(leavesPath), function (err) {
t.error(err)
- wroteStorage = true
+ loaded = true
maybeDone()
})
})
diff --git a/test/download-dht-torrent.js b/test/download-dht-torrent.js
index 50e2013..bc51a71 100644
--- a/test/download-dht-torrent.js
+++ b/test/download-dht-torrent.js
@@ -38,9 +38,10 @@ test('Download using DHT (via .torrent file)', function (t) {
client1.add(leavesParsed)
- var announced, wroteStorage
+ var announced = false
+ var loaded = false
function maybeDone (err) {
- if ((announced && wroteStorage) || err) cb(err, client1)
+ if ((announced && loaded) || err) cb(err, client1)
}
client1.on('torrent', function (torrent) {
@@ -56,7 +57,7 @@ test('Download using DHT (via .torrent file)', function (t) {
})
torrent.load(fs.createReadStream(leavesPath), function (err) {
- wroteStorage = true
+ loaded = true
maybeDone(err)
})
})