grunt-parallel-spec-runner
Advanced tools
Comparing version 0.3.9 to 0.3.10
{ | ||
"name": "grunt-parallel-spec-runner", | ||
"version": "0.3.9", | ||
"version": "0.3.10", | ||
"description": "Plugin used to configure and launch multiple spec ", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/RallySoftware/grunt-parallel-spec-runner.git", |
@@ -97,3 +97,3 @@ /* | ||
if(specRunner.specs.length > 1){ | ||
specs = '{' + specs + '}'; | ||
specs = '{' + specs + '}'; | ||
} | ||
@@ -225,2 +225,3 @@ var targetName = 'jasmine:' + options.target + ':build:' + specRunner.file + ':' + specs; | ||
return { | ||
Inconclusive:false, | ||
writeSummaryInfo: function(){ | ||
@@ -231,3 +232,3 @@ buildSpecRunners(); | ||
writeSummary: function(){ | ||
var ln = grunt.util.repeat(process.stdout.columns, '-'), | ||
var ln = grunt.util.repeat(80, '-'), | ||
tab = '\t'; | ||
@@ -264,4 +265,3 @@ | ||
if(totalLosses > 0) | ||
{ | ||
if(totalLosses > 0){ | ||
totalResult = (totalLosses + ' of ' + totalWins + ' tests failed').red; | ||
@@ -274,8 +274,12 @@ } | ||
var row = file | ||
+ ' | ' + (' ' + specRunner.specs.length).slice(-4) + ' ' | ||
+ ' | ' + (' ' + specRunner.summary.tests).slice(-4) + ' ' | ||
+ ' | ' + (' ' + specRunner.summary.time).slice(-6) + ' ' | ||
+ ' | ' + specRunner.summary.message + ' '; | ||
+ ' | ' + (' ' + specRunner.specs.length).slice(-4) + ' ' | ||
+ ' | ' + (' ' + specRunner.summary.tests).slice(-4) + ' ' | ||
+ ' | ' + (' ' + specRunner.summary.time).slice(-6) + ' ' | ||
+ ' | ' + specRunner.summary.message + ' '; | ||
grunt.log.writeln(row); | ||
if(grunt.log.uncolor(specRunner.summary.message) == 'Inconclusive'){ | ||
this.Inconclusive = true; | ||
} | ||
if(options.verbose){ | ||
@@ -296,10 +300,10 @@ specRunner.specs.forEach(function(path){ | ||
}); | ||
}, this); | ||
grunt.log.writeln(ln); | ||
var row = | ||
' ' | ||
+ ' | ' + (' ' + totalFiles).slice(-4) + ' ' | ||
+ ' | ' + (' ' + totalTests).slice(-4) + ' ' | ||
+ ' | ' + (' ' + totalSeconds).slice(-6) + ' ' | ||
+ ' | ' + totalResult; | ||
+ ' | ' + (' ' + totalFiles).slice(-4) + ' ' | ||
+ ' | ' + (' ' + totalTests).slice(-4) + ' ' | ||
+ ' | ' + (' ' + totalSeconds).slice(-6) + ' ' | ||
+ ' | ' + totalResult; | ||
@@ -327,6 +331,3 @@ grunt.log.writeln(row); | ||
grunt.registerMultiTask('parallel_spec_runner', 'Plugin used to configure and launch multiple spec ', function () { | ||
//TODO: add grunt-time plugin to measure execution time | ||
var startTime = new Date(); | ||
var options = this.options({ | ||
@@ -350,3 +351,3 @@ specs: [], | ||
} | ||
options.specs = grunt.file.expand({filter: 'isFile'}, options.specs); | ||
@@ -396,2 +397,5 @@ options.excludedSpecs = grunt.file.expand({filter: 'isFile'}, options.excludedSpecs); | ||
specRunner.writeSummary(); | ||
if(specRunner.Inconclusive){ | ||
grunt.log.error('Task failed due to '.red + 'inconclusive'.yellow + ' results, please try again.'.red); | ||
} | ||
var endTime = new Date(); | ||
@@ -398,0 +402,0 @@ grunt.log.writeln("Total Execution Time:" + Math.ceil((endTime - startTime) / 1000 / 60).toFixed(2) + ' Minutes'); |
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
214611
449