Comparing version 1.0.0 to 1.1.0
@@ -9,11 +9,19 @@ var debug = require('debug')('microboot:run') | ||
if (!next) { | ||
return callback() | ||
} | ||
debug('- running "' + next.name + '"') | ||
next(function () { | ||
if (!remaining.length) { | ||
return callback() | ||
} | ||
var async = !!next.length | ||
if (!async) { | ||
next() | ||
return run(remaining, callback) | ||
} | ||
return next(function () { | ||
return run(remaining, callback) | ||
}) | ||
} |
{ | ||
"name": "microboot", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Boot your app.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,5 +0,3 @@ | ||
module.exports = function database (next) { | ||
module.exports = function database () { | ||
global.database = true | ||
return next() | ||
} |
@@ -6,2 +6,3 @@ var up = require('../../lib/up') | ||
global.database = false | ||
global.endpoints = false | ||
global.end1 = false | ||
@@ -44,5 +45,8 @@ global.end2 = false | ||
it('should run database phase', function (done) { | ||
it('should run database and endpoints phase', function (done) { | ||
this.slow(200) | ||
up(['test/data/fake'], function () { | ||
expect(global.database).to.equal(true) | ||
expect(global.endpoints).to.equal(true) | ||
@@ -49,0 +53,0 @@ done() |
7345
18
155