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/node/seed-stream.js
parentf6121c311b754591a737aec0d3abce299b4908c8 (diff)
Convert the tests to use let/const instead of var
Diffstat (limited to 'test/node/seed-stream.js')
-rw-r--r--test/node/seed-stream.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/node/seed-stream.js b/test/node/seed-stream.js
index e56964e..3e973b6 100644
--- a/test/node/seed-stream.js
+++ b/test/node/seed-stream.js
@@ -1,18 +1,18 @@
-var Readable = require('readable-stream').Readable
-var series = require('run-series')
-var test = require('tape')
-var Tracker = require('bittorrent-tracker/server')
-var WebTorrent = require('../../')
+const Readable = require('readable-stream').Readable
+const series = require('run-series')
+const test = require('tape')
+const Tracker = require('bittorrent-tracker/server')
+const WebTorrent = require('../../')
test('client.seed: stream', function (t) {
t.plan(9)
- var tracker = new Tracker({ udp: false, ws: false })
+ const tracker = new Tracker({ udp: false, ws: false })
tracker.on('error', function (err) { t.fail(err) })
tracker.on('warning', function (err) { t.fail(err) })
- var seeder, client, announceUrl, magnetURI
+ let seeder, client, announceUrl, magnetURI
series([
function (cb) {
@@ -20,7 +20,7 @@ test('client.seed: stream', function (t) {
},
function (cb) {
- var port = tracker.http.address().port
+ const port = tracker.http.address().port
announceUrl = 'http://localhost:' + port + '/announce'
seeder = new WebTorrent({ dht: false })
@@ -28,12 +28,12 @@ test('client.seed: stream', function (t) {
seeder.on('error', function (err) { t.fail(err) })
seeder.on('warning', function (err) { t.fail(err) })
- var stream = new Readable()
+ const stream = new Readable()
stream._read = function () {}
stream.push('HELLO WORLD\n')
stream.push(null)
- var seederOpts = {
+ const seederOpts = {
name: 'hello.txt',
pieceLength: 5,
announce: [announceUrl]