Skip to content

Commit

Permalink
Adjust on stream
Browse files Browse the repository at this point in the history
Prevent gulp stops execution when test abort. New option: abortOnFailure(bool).
  • Loading branch information
dgateles authored Jun 5, 2019
1 parent a4d831b commit dddef70
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@ var nightwatchPlugin = function(options) {
child.kill();
}

if (stream) {
if(options.abortOnFailure === true && stream) {
if (code) {
stream.emit('error', new PluginError(PLUGIN_NAME, 'nightwatch exited with code ' + code));
} else {
stream.emit('end');
}
} else {
stream.emit('end');
}
}

Expand Down

0 comments on commit dddef70

Please sign in to comment.