Gulp runSequence running in parallel

306 Views Asked by At

I have the following Gulp runSequence task:

gulp.task('test', () => runSequence('test:unit', 'test:e2e'));

When the two tasks are:

gulp.task('test:unit', () => gulp.start('jasmine'));
gulp.task('test:e2e', () => runSequence('webdriver:update', 'protractor'));

Those commands are running in parallel (Jasmine and the other two).

If I change this to be:

gulp.task('test', () => runSequence('jasmine', 'test:e2e'));

It is working ok (serially)

What am I doing wrong?

1

There are 1 best solutions below

0
On

orchestrator.start() (and therefore gulp.start()) is asynchronous. That means you need to signal async completion in your test:unit task:

gulp.task('test:unit', (done) => gulp.start('jasmine', done));