You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a project that uses jasmine, selenium, and webdriverio to drive selenium based tests. I started using gulp-jasmine yesterday and have been running into a problem where the gulp execution just exits as soon as a syntax error is encountered in any of my jasmine test files.
This is a problem because my test process starts 2 node servers to support the tests and these (as well as the Selenium driver) are all left running when this exists. I'm running with the following gulp tasks:
If I understand the problem correctly, this is not related to gulp-jasmine but to the limitation of error management in gulp (explanation). I've simplified your example and introduced gulp plumber in your stream, and it appears to work.
gulp.task('b',function(done){gulp.src('*.spec.js').pipe(plumber()).pipe(jasmine()).on('error',function(err){console.log(err.toString());}).on('finish',done);});gulp.task('a',['b'],function(){console.log("We're in b");});
output is:
[11:47:30] Starting 'b'...
Error
SyntaxError in plugin 'gulp-jasmine'
Message:
C:\POC\test-gulp-jasmine\test.spec.js:7
};
^
Unexpected token ;
[11:47:30] Finished 'b' after 43 ms
[11:47:30] Starting 'a'...
We're in b
[11:47:30] Finished 'a' after 103 µs
Closing for now, feel free to reopen if I misunderstood the issue.
I'm working on a project that uses jasmine, selenium, and webdriverio to drive selenium based tests. I started using gulp-jasmine yesterday and have been running into a problem where the gulp execution just exits as soon as a syntax error is encountered in any of my jasmine test files.
This is a problem because my test process starts 2 node servers to support the tests and these (as well as the Selenium driver) are all left running when this exists. I'm running with the following gulp tasks:
In this case, the on('error' is never run so the processes are never cleaned up.
The text was updated successfully, but these errors were encountered: