exports.__setup = function (test){ ctrl.seq([ curry([db],model.clean) , curry([platforms.concat(tests)],db.save,db) , curry([db], model.rollout) , test.done ]).go() }
exports.database = function (done){ ctrl.seq([ function (){ model.clean(this.next) }, function (err){ if(err) throw err model.modules.save(data.platforms.concat(data.tests),this.next) }, function (err){ if(err) throw err model.rollout(done) }])() }
exports.tests = function (done){ ctrl.seq([ function (){ exports.database(this.next) }, function (){ //app.model = model var runner = new Runner(model) runner.start() var started = false runner.on('drain',function(){ if(!started){ runner.stop() started = true done(null,model) } }) }]).throws()() }