grunt-parallel-spec-runner
Advanced tools
Comparing version 0.3.3 to 0.3.4
{ | ||
"name": "grunt-parallel-spec-runner", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"description": "Plugin used to configure and launch multiple spec ", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/RallySoftware/grunt-parallel-spec-runner.git", |
@@ -28,5 +28,10 @@ /* | ||
var handleError = function(error, result, code, specFile){ | ||
var handleError = function(error, result, code, specRuner){ | ||
if(code !== 0){ | ||
grunt.log.error(specFile || '' + ':' + result); | ||
var message = 'Specs:' + (specRuner.file || '?').red + grunt.util.linefeed; | ||
specRuner.specs.forEach(function(spec){ | ||
message += '\t' + spec + grunt.util.linefeed | ||
}); | ||
message += grunt.util.linefeed + String(error); | ||
grunt.log.error(message); | ||
} | ||
@@ -71,5 +76,7 @@ }; | ||
summary: { | ||
test: '?', | ||
time: 0, | ||
tests: 0, | ||
wins: 0, | ||
losses: 0 , | ||
losses: 0, | ||
message: 'Inconclusive'.yellow, | ||
failedSpecs: [] | ||
@@ -90,3 +97,3 @@ } | ||
{ | ||
handleError(error, result, code, specRunner.file); | ||
handleError(error, result, code, specRunner); | ||
filesWritten[specRunner.file] = true; | ||
@@ -133,3 +140,3 @@ }; | ||
var df = function(error, result, code){ | ||
handleError(error, result, code, specRunner.file); | ||
handleError(error, result, code, specRunner); | ||
activeRunners--; | ||
@@ -225,2 +232,6 @@ runnersCompleted++; | ||
return { | ||
writeSummaryInfo: function(){ | ||
buildSpecRunners(); | ||
this.writeSummary(); | ||
}, | ||
writeSummary: function(){ | ||
@@ -329,2 +340,3 @@ var ln = grunt.util.repeat(process.stdout.getWindowSize()[0], '-'), | ||
browser: 'chrome', | ||
nowrite: grunt.option('no-write') || false, | ||
debug: grunt.option('debug') || false, | ||
@@ -361,4 +373,10 @@ verbose: grunt.option('verbose') || false, | ||
var done = this.async(), me = this; | ||
var specRunner = new SpecRunner(options), | ||
i = setInterval(function () { | ||
var specRunner = new SpecRunner(options); | ||
if(options.nowrite) { | ||
specRunner.writeSummaryInfo(); | ||
done(me.errorCount == 0); | ||
} | ||
else { | ||
var i = setInterval(function () { | ||
if (specRunner.isDone()) { | ||
@@ -369,3 +387,3 @@ clearInterval(i); | ||
var endTime = new Date(); | ||
grunt.log.writeln("Total Execution Time:" + Math.ceil((endTime - startTime)/1000/60).toFixed(2) + ' Minutes'); | ||
grunt.log.writeln("Total Execution Time:" + Math.ceil((endTime - startTime) / 1000 / 60).toFixed(2) + ' Minutes'); | ||
@@ -378,3 +396,4 @@ done(me.errorCount == 0); | ||
}, 1000); | ||
} | ||
}); | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
213945
436