Show message if no specs are found in console reporter

[#12784235]
This commit is contained in:
Christopher Amavisca, Greg Cobb and Luan Santos
2014-03-10 12:00:49 -07:00
parent af4cc76e2a
commit 3a5672cd33
3 changed files with 36 additions and 14 deletions

View File

@@ -36,16 +36,21 @@ getJasmineRequireObj().ConsoleReporter = function() {
specFailureDetails(failedSpecs[i]);
}
printNewline();
var specCounts = specCount + ' ' + plural('spec', specCount) + ', ' +
failureCount + ' ' + plural('failure', failureCount);
if(specCount > 0) {
printNewline();
if (pendingCount) {
specCounts += ', ' + pendingCount + ' pending ' + plural('spec', pendingCount);
var specCounts = specCount + ' ' + plural('spec', specCount) + ', ' +
failureCount + ' ' + plural('failure', failureCount);
if (pendingCount) {
specCounts += ', ' + pendingCount + ' pending ' + plural('spec', pendingCount);
}
print(specCounts);
} else {
print('No specs found');
}
print(specCounts);
printNewline();
var seconds = timer.elapsed() / 1000;
print('Finished in ' + seconds + ' ' + plural('second', seconds));