Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start the FastBoot server immediately when --build=false #257

Closed
3 changes: 3 additions & 0 deletions lib/tasks/fastboot-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ module.exports = CoreObject.extend({
debug('run');
const restart = () => this.restart(options);
this.addon.on('postBuild', restart);
if (options.build === false) {
restart(options);
}
},

start(options) {
Expand Down
6 changes: 6 additions & 0 deletions test/lib-tasks-fastboot-server-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ describe('fastboot server task', function() {
addon.emit('postBuild');
expect(restartStub.called).to.be.ok;
});

it('calls restart immediately when --build=false', function() {
const restartStub = this.sinon.stub(task, 'restart');
task.run(new CommandOptions({ build: false }));
expect(restartStub.called).to.be.ok;
});
});

describe('restart', function() {
Expand Down