0

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?

Yaniv Efraim
  • 6,633
  • 7
  • 53
  • 96

1 Answers1

1

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));
Sven Schoenung
  • 30,224
  • 8
  • 65
  • 70