aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/api/singlePod.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/api/singlePod.js')
-rw-r--r--test/api/singlePod.js28
1 files changed, 16 insertions, 12 deletions
diff --git a/test/api/singlePod.js b/test/api/singlePod.js
index be944d8da..a8ae43aee 100644
--- a/test/api/singlePod.js
+++ b/test/api/singlePod.js
@@ -1,6 +1,7 @@
1;(function () { 1;(function () {
2 'use strict' 2 'use strict'
3 3
4 var async = require('async')
4 var chai = require('chai') 5 var chai = require('chai')
5 var fs = require('fs') 6 var fs = require('fs')
6 var expect = chai.expect 7 var expect = chai.expect
@@ -18,16 +19,21 @@
18 before(function (done) { 19 before(function (done) {
19 this.timeout(20000) 20 this.timeout(20000)
20 21
21 utils.flushTests(function () { 22 async.series([
22 utils.runServer(1, function (app1, url1) { 23 function (next) {
23 app = app1 24 utils.flushTests(next)
24 url = url1 25 },
25 26 function (next) {
26 webtorrent.create({ host: 'client', port: '1' }, function () { 27 utils.runServer(1, function (app1, url1) {
27 done() 28 app = app1
29 url = url1
30 next()
28 }) 31 })
29 }) 32 },
30 }) 33 function (next) {
34 webtorrent.create({ host: 'client', port: '1' }, next)
35 }
36 ], done)
31 }) 37 })
32 38
33 it('Should not have videos', function (done) { 39 it('Should not have videos', function (done) {
@@ -132,9 +138,7 @@
132 138
133 // Keep the logs if the test failed 139 // Keep the logs if the test failed
134 if (this.ok) { 140 if (this.ok) {
135 utils.flushTests(function () { 141 utils.flushTests(done)
136 done()
137 })
138 } else { 142 } else {
139 done() 143 done()
140 } 144 }