From 77c2df95857b9fbc0a5935c51ffef073ffc277b7 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 30 Oct 2015 18:34:37 +0100 Subject: Fix tests --- test/api/multiplePods.js | 11 +++++------ test/api/singlePod.js | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'test') diff --git a/test/api/multiplePods.js b/test/api/multiplePods.js index fff179006..81d4b06b6 100644 --- a/test/api/multiplePods.js +++ b/test/api/multiplePods.js @@ -61,7 +61,7 @@ .end(function (err, res) { if (err) throw err - webtorrent.create(function () { + webtorrent.create({ host: 'client', port: '1' }, function () { done() }) }) @@ -214,7 +214,7 @@ describe('Should seed the uploaded video', function () { it('Should add the file 1 by asking pod 3', function (done) { // Yes, this could be long - this.timeout(60000) + this.timeout(200000) getVideosList(urls[2], function (err, res) { if (err) throw err @@ -232,15 +232,13 @@ it('Should add the file 2 by asking pod 1', function (done) { // Yes, this could be long - this.timeout(60000) + this.timeout(200000) getVideosList(urls[0], function (err, res) { if (err) throw err var video = res.body[1] - video_id = video._id - webtorrent.add(video.magnetUri, function (torrent) { expect(torrent.files).to.exist expect(torrent.files.length).to.equal(1) @@ -253,12 +251,13 @@ it('Should add the file 3 by asking pod 2', function (done) { // Yes, this could be long - this.timeout(60000) + this.timeout(200000) getVideosList(urls[1], function (err, res) { if (err) throw err var video = res.body[2] + video_id = res.body[1]._id webtorrent.add(video.magnetUri, function (torrent) { expect(torrent.files).to.exist diff --git a/test/api/singlePod.js b/test/api/singlePod.js index 59a617970..149c10b9e 100644 --- a/test/api/singlePod.js +++ b/test/api/singlePod.js @@ -23,7 +23,7 @@ app = app1 url = url1 - webtorrent.create(function () { + webtorrent.create({ host: 'client', port: '1' }, function () { done() }) }) -- cgit v1.2.3