From dddef7032f8119e680244c84b458ab22b842db32 Mon Sep 17 00:00:00 2001 From: dgateles Date: Wed, 5 Jun 2019 15:10:51 -0300 Subject: [PATCH] Adjust on stream Prevent gulp stops execution when test abort. New option: abortOnFailure(bool). --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 7167d9b..4a6d73e 100644 --- a/index.js +++ b/index.js @@ -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'); } }