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
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2015-01-26 22:30:22 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-01-26 22:30:22 +0300
commit7b6cfebd732dae5b630e12a107c0a4036b7100eb (patch)
tree66f567eaf2ac96cf006340b12fc700284e0b9d5e /test/basic.js
parente2ca6fbaba8f59d31de315d4d5515f7f527bace0 (diff)
after client.destroy(), no "ready" event emitted
Diffstat (limited to 'test/basic.js')
-rw-r--r--test/basic.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/basic.js b/test/basic.js
index 107fc8a..6310a51 100644
--- a/test/basic.js
+++ b/test/basic.js
@@ -99,7 +99,7 @@ test('after client.destroy(), throw on client.add() or client.seed()', function
})
})
-test('after client.destroy(), no "torrent" event should be emitted', function (t) {
+test('after client.destroy(), no "torrent" or "ready" events emitted', function (t) {
t.plan(1)
var client = new WebTorrent({ dht: false, tracker: false })
@@ -109,6 +109,9 @@ test('after client.destroy(), no "torrent" event should be emitted', function (t
client.seed(leavesBook, function () {
t.fail('unexpected "torrent" event (from seed)')
})
+ client.on('ready', function () {
+ t.fail('unexpected "ready" event')
+ })
client.destroy(function () {
t.pass('client destroyed')
})