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>2016-09-27 06:07:19 +0300
committerGitHub <noreply@github.com>2016-09-27 06:07:19 +0300
commitd62778ed0786818971a72f75be4d4a52494cae83 (patch)
tree2cfcb31d2aea3f9e8812cd64931584445f18736c /test
parent1cbe669a6552165d2050c6098fbd49817a6da3d0 (diff)
parent001506e2234df4ac8fb5d7e14428618d3e64fc75 (diff)
Merge pull request #928 from feross/web-seeds
Seed: allow announce field with trackers disabled
Diffstat (limited to 'test')
-rw-r--r--test/client-seed.js8
-rw-r--r--test/node/basic.js7
2 files changed, 9 insertions, 6 deletions
diff --git a/test/client-seed.js b/test/client-seed.js
index eede4a3..7a41ba9 100644
--- a/test/client-seed.js
+++ b/test/client-seed.js
@@ -14,7 +14,8 @@ test('client.seed: torrent file (Buffer)', function (t) {
client.on('warning', function (err) { t.fail(err) })
client.seed(fixtures.leaves.content, {
- name: 'Leaves of Grass by Walt Whitman.epub'
+ name: 'Leaves of Grass by Walt Whitman.epub',
+ announce: []
}, function (torrent) {
t.equal(client.torrents.length, 1)
t.equal(torrent.infoHash, fixtures.leaves.parsedTorrent.infoHash)
@@ -38,7 +39,7 @@ test('client.seed: torrent file (Buffer), set name on buffer', function (t) {
var buf = Buffer.from(fixtures.leaves.content)
buf.name = 'Leaves of Grass by Walt Whitman.epub'
- client.seed(buf, function (torrent) {
+ client.seed(buf, {announce: []}, function (torrent) {
t.equal(client.torrents.length, 1)
t.equal(torrent.infoHash, fixtures.leaves.parsedTorrent.infoHash)
t.equal(torrent.magnetURI, fixtures.leaves.magnetURI)
@@ -61,7 +62,8 @@ test('client.seed: torrent file (Blob)', function (t) {
client.on('warning', function (err) { t.fail(err) })
client.seed(new Blob([ fixtures.leaves.content ]), {
- name: 'Leaves of Grass by Walt Whitman.epub'
+ name: 'Leaves of Grass by Walt Whitman.epub',
+ announce: []
}, function (torrent) {
t.equal(client.torrents.length, 1)
t.equal(torrent.infoHash, fixtures.leaves.parsedTorrent.infoHash)
diff --git a/test/node/basic.js b/test/node/basic.js
index 6b32fff..8bf598c 100644
--- a/test/node/basic.js
+++ b/test/node/basic.js
@@ -77,7 +77,8 @@ test('client.seed: filesystem path to file, string', function (t) {
client.on('warning', function (err) { t.fail(err) })
client.seed(fixtures.leaves.contentPath, {
- name: 'Leaves of Grass by Walt Whitman.epub'
+ name: 'Leaves of Grass by Walt Whitman.epub',
+ announce: []
}, function (torrent) {
t.equal(client.torrents.length, 1)
t.equal(torrent.infoHash, fixtures.leaves.parsedTorrent.infoHash)
@@ -98,7 +99,7 @@ test('client.seed: filesystem path to folder with one file, string', function (t
client.on('error', function (err) { t.fail(err) })
client.on('warning', function (err) { t.fail(err) })
- client.seed(fixtures.folder.contentPath, function (torrent) {
+ client.seed(fixtures.folder.contentPath, {announce: false}, function (torrent) {
t.equal(client.torrents.length, 1)
t.equal(torrent.infoHash, fixtures.folder.parsedTorrent.infoHash)
t.equal(torrent.magnetURI, fixtures.folder.magnetURI)
@@ -118,7 +119,7 @@ test('client.seed: filesystem path to folder with multiple files, string', funct
client.on('error', function (err) { t.fail(err) })
client.on('warning', function (err) { t.fail(err) })
- client.seed(fixtures.numbers.contentPath, function (torrent) {
+ client.seed(fixtures.numbers.contentPath, {announce: false}, function (torrent) {
t.equal(client.torrents.length, 1)
t.equal(torrent.infoHash, fixtures.numbers.parsedTorrent.infoHash)
t.equal(torrent.magnetURI, fixtures.numbers.magnetURI)