Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add default webrtc trackers when there is webrtc support #673

Closed
Closed
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

fix tests : remove the trackers when testing the magnetURI in the bro…

…wser
  • Loading branch information
rom1504 committed Mar 14, 2016
commit d98414904816b93539b604f695a0c7103c9263b3
@@ -16,7 +16,7 @@ test('client.add: magnet uri, utf-8 string', function (t) {

torrent.on('infoHash', function () {
t.equal(torrent.infoHash, fixtures.leaves.parsedTorrent.infoHash)
t.equal(torrent.magnetURI, fixtures.leaves.magnetURI)
t.equal(torrent.magnetURI.split("&tr")[0], fixtures.leaves.magnetURI)

client.remove(fixtures.leaves.magnetURI, function (err) { t.error(err, 'torrent destroyed') })
t.equal(client.torrents.length, 0)
@@ -38,7 +38,7 @@ test('client.add: torrent file, buffer', function (t) {

torrent.on('infoHash', function () {
t.equal(torrent.infoHash, fixtures.leaves.parsedTorrent.infoHash)
t.equal(torrent.magnetURI, fixtures.leaves.magnetURI)
t.equal(torrent.magnetURI.split("&tr")[0], fixtures.leaves.magnetURI)

client.remove(fixtures.leaves.torrent, function (err) { t.error(err, 'torrent destroyed') })
t.equal(client.torrents.length, 0)
@@ -104,7 +104,7 @@ test('client.add: parsed torrent, from `parse-torrent`', function (t) {

torrent.on('infoHash', function () {
t.equal(torrent.infoHash, fixtures.leaves.parsedTorrent.infoHash)
t.equal(torrent.magnetURI, fixtures.leaves.magnetURI)
t.equal(torrent.magnetURI.split("&tr")[0], fixtures.leaves.magnetURI)

client.remove(fixtures.leaves.parsedTorrent, function (err) { t.error(err, 'torrent destroyed') })
t.equal(client.torrents.length, 0)
@@ -17,7 +17,7 @@ test('client.seed: torrent file (Buffer)', function (t) {
}, function (torrent) {
t.equal(client.torrents.length, 1)
t.equal(torrent.infoHash, fixtures.leaves.parsedTorrent.infoHash)
t.equal(torrent.magnetURI, fixtures.leaves.magnetURI)
t.equal(torrent.magnetURI.split("&tr")[0], fixtures.leaves.magnetURI)

client.remove(torrent, function (err) { t.error(err, 'torrent removed') })
t.equal(client.torrents.length, 0)
@@ -40,7 +40,7 @@ test('client.seed: torrent file (Buffer), set name on buffer', function (t) {
client.seed(buf, function (torrent) {
t.equal(client.torrents.length, 1)
t.equal(torrent.infoHash, fixtures.leaves.parsedTorrent.infoHash)
t.equal(torrent.magnetURI, fixtures.leaves.magnetURI)
t.equal(torrent.magnetURI.split("&tr")[0], fixtures.leaves.magnetURI)

client.remove(torrent, function (err) { t.error(err, 'torrent removed') })
t.equal(client.torrents.length, 0)
@@ -64,7 +64,7 @@ test('client.seed: torrent file (Blob)', function (t) {
}, function (torrent) {
t.equal(client.torrents.length, 1)
t.equal(torrent.infoHash, fixtures.leaves.parsedTorrent.infoHash)
t.equal(torrent.magnetURI, fixtures.leaves.magnetURI)
t.equal(torrent.magnetURI.split("&tr")[0], fixtures.leaves.magnetURI)

client.remove(torrent, function (err) { t.error(err, 'torrent removed') })
t.equal(client.torrents.length, 0)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.