gulp-jasmine-phantom
Advanced tools
Comparing version 1.0.11 to 1.0.12
18
index.js
@@ -46,4 +46,8 @@ 'use strict' | ||
function runPhantom(childArguments, onComplete) { | ||
console.log(childArguments); | ||
execFile('phantomjs', childArguments, function(error, stdout, stderr) { | ||
var success = null; | ||
debugger; | ||
if(error !== null) { | ||
success = new gutil.PluginError('gulp-jasmine-phantomjs', 'Tests contained failures. Check logs for details.'); | ||
} | ||
@@ -53,9 +57,11 @@ if (stderr !== '') { | ||
gutil.log(gutil.colors.red('error: '), stderr); | ||
success = new gutil.PluginError('gulp-jasmine-phantomjs', 'Failed to open test runner ' + gutil.colors.blue(childArguments[1])); | ||
} | ||
console.log(stdout); | ||
if(gulpOptions.specHtml === undefined && (gulpOptions.keepRunner === undefined || gulpOptions.keepRunner === false)) { | ||
cleanup(childArguments[1]); | ||
} | ||
onComplete(); | ||
console.log(stdout); | ||
onComplete(success); | ||
}); | ||
@@ -114,3 +120,3 @@ } | ||
} else { | ||
onComplete(); | ||
onComplete(null); | ||
} | ||
@@ -153,4 +159,4 @@ }); | ||
files: filePaths, | ||
onComplete: function() { | ||
callback(null); | ||
onComplete: function(success) { | ||
callback(success); | ||
} | ||
@@ -157,0 +163,0 @@ }); |
{ | ||
"name": "gulp-jasmine-phantom", | ||
"version": "1.0.11", | ||
"version": "1.0.12", | ||
"description": "Jasmine 2.0 suite runner, optionally with PhantomJS", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
125897
3152