@@ -3,9 +3,13 @@ var Server = require('karma').Server
33var mocha = require ( 'gulp-mocha' )
44var ipfsd = require ( 'ipfsd-ctl' )
55var fs = require ( 'fs' )
6+ var runSequence = require ( 'run-sequence' )
67
7- gulp . task ( 'default' , function ( ) {
8- gulp . start ( 'test:node' , 'test:browser' )
8+ gulp . task ( 'default' , function ( done ) {
9+ runSequence (
10+ 'test:node' ,
11+ // 'test:browser',
12+ done )
913} )
1014
1115gulp . task ( 'test:node' , function ( done ) {
@@ -19,16 +23,25 @@ gulp.task('test:node', function (done) {
1923 . once ( 'end' , function ( ) {
2024 stopDisposableDaemons ( daemons , function ( ) {
2125 process . exit ( )
26+ // done()
2227 } )
2328 } )
2429 } )
2530} )
2631
2732gulp . task ( 'test:browser' , function ( done ) {
28- new Server ( {
29- configFile : __dirname + '/karma.conf.js' ,
30- singleRun : true
31- } , done ) . start ( )
33+ startDisposableDaemons ( function ( daemons ) {
34+ new Server ( {
35+ configFile : __dirname + '/karma.conf.js' ,
36+ singleRun : true
37+ } , finish ) . start ( )
38+
39+ function finish ( ) {
40+ stopDisposableDaemons ( daemons , function ( ) {
41+ done ( )
42+ } )
43+ }
44+ } )
3245} )
3346
3447function startDisposableDaemons ( callback ) {
@@ -54,10 +67,9 @@ function startDisposableDaemons (callback) {
5467 throw err
5568 }
5669
57- console . log ( 'ipfs init done - ' + key )
5870 ipfsNodes [ key ] = node
5971
60- console . log ( 'ipfs config (bootstrap and mdns off) - ' + key )
72+ console . log ( ' ipfs init done - (bootstrap and mdns off) - ' + key )
6173
6274 ipfsNodes [ key ] . setConfig ( 'Bootstrap' , null , function ( err ) {
6375 if ( err ) {
0 commit comments