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>2020-10-29 07:32:23 +0300
committerFeross Aboukhadijeh <feross@feross.org>2020-10-29 07:32:23 +0300
commitc73870ad0edd8f696f0a8e93289a34f0c536e3db (patch)
tree8adda2773b55d089660d07267b924934d782006b /test/torrent-destroy.js
parentf6121c311b754591a737aec0d3abce299b4908c8 (diff)
Convert the tests to use let/const instead of var
Diffstat (limited to 'test/torrent-destroy.js')
-rw-r--r--test/torrent-destroy.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/torrent-destroy.js b/test/torrent-destroy.js
index ceae205..5894627 100644
--- a/test/torrent-destroy.js
+++ b/test/torrent-destroy.js
@@ -1,16 +1,16 @@
-var fixtures = require('webtorrent-fixtures')
-var test = require('tape')
-var WebTorrent = require('../')
+const fixtures = require('webtorrent-fixtures')
+const test = require('tape')
+const WebTorrent = require('../')
test('torrent.destroy: destroy and remove torrent', function (t) {
t.plan(5)
- var client = new WebTorrent({ dht: false, tracker: false })
+ const client = new WebTorrent({ dht: false, tracker: false })
client.on('error', function (err) { t.fail(err) })
client.on('warning', function (err) { t.fail(err) })
- var torrent = client.add(fixtures.leaves.parsedTorrent.infoHash)
+ const torrent = client.add(fixtures.leaves.parsedTorrent.infoHash)
t.equal(client.torrents.length, 1)
torrent.on('infoHash', function () {