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/browser
parentf6121c311b754591a737aec0d3abce299b4908c8 (diff)
Convert the tests to use let/const instead of var
Diffstat (limited to 'test/browser')
-rw-r--r--test/browser/basic.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/browser/basic.js b/test/browser/basic.js
index a70f530..fcdcc80 100644
--- a/test/browser/basic.js
+++ b/test/browser/basic.js
@@ -1,7 +1,7 @@
-var test = require('tape')
-var WebTorrent = require('../../')
+const test = require('tape')
+const WebTorrent = require('../../')
-var img = Buffer.from('R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7', 'base64')
+const img = Buffer.from('R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7', 'base64')
img.name = 'img.png'
function verifyImage (t, err, elem) {
@@ -20,7 +20,7 @@ if (!(global && global.process && global.process.versions && global.process.vers
test('image append w/ query selector', function (t) {
t.plan(6)
- 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) })
@@ -38,7 +38,7 @@ if (!(global && global.process && global.process.versions && global.process.vers
test('image append w/ element', function (t) {
t.plan(6)
- 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) })
@@ -56,12 +56,12 @@ if (!(global && global.process && global.process.versions && global.process.vers
test('image render w/ query selector', function (t) {
t.plan(6)
- 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 tag = document.createElement('img')
+ const tag = document.createElement('img')
tag.className = 'tag'
document.body.appendChild(tag)
@@ -78,12 +78,12 @@ if (!(global && global.process && global.process.versions && global.process.vers
test('image render w/ element', function (t) {
t.plan(6)
- 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 tag = document.createElement('img')
+ const tag = document.createElement('img')
document.body.appendChild(tag)
client.seed(img, function (torrent) {
@@ -100,7 +100,7 @@ if (!(global && global.process && global.process.versions && global.process.vers
test('WebTorrent.WEBRTC_SUPPORT', function (t) {
t.plan(2)
- 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) })