diff --git a/test/executor.test.js b/test/executor.test.js index bd17481..46513f0 100644 --- a/test/executor.test.js +++ b/test/executor.test.js @@ -53,11 +53,12 @@ describe('executor', function() { }); describe('when booting', function() { - it('should set the booting status', function(done) { + it('should set the `booting` flag during execution', function(done) { expect(app.booting).to.be.undefined(); - boot.execute(app, dummyInstructions, function(err) { + boot.execute(app, simpleAppInstructions(), function(err) { expect(err).to.be.undefined(); - expect(app.booting).to.be.false(); + expect(process.bootingFlagSet).to.be.ok(); + expect(app.booting).to.not.be.ok(); done(); }); }); diff --git a/test/fixtures/simple-app/boot/booting.js b/test/fixtures/simple-app/boot/booting.js new file mode 100644 index 0000000..b7ec8b8 --- /dev/null +++ b/test/fixtures/simple-app/boot/booting.js @@ -0,0 +1,6 @@ +module.exports = function(app, cb) { + if (app.booting) + process.bootingFlagSet = true; + + process.nextTick(cb); +};