parent
af4cc76e2a
commit
3a5672cd33
+12
-7
@@ -71,16 +71,21 @@ getJasmineRequireObj().ConsoleReporter = function() {
|
|||||||
specFailureDetails(failedSpecs[i]);
|
specFailureDetails(failedSpecs[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
printNewline();
|
if(specCount > 0) {
|
||||||
var specCounts = specCount + ' ' + plural('spec', specCount) + ', ' +
|
printNewline();
|
||||||
failureCount + ' ' + plural('failure', failureCount);
|
|
||||||
|
|
||||||
if (pendingCount) {
|
var specCounts = specCount + ' ' + plural('spec', specCount) + ', ' +
|
||||||
specCounts += ', ' + pendingCount + ' pending ' + plural('spec', pendingCount);
|
failureCount + ' ' + plural('failure', failureCount);
|
||||||
|
|
||||||
|
if (pendingCount) {
|
||||||
|
specCounts += ', ' + pendingCount + ' pending ' + plural('spec', pendingCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
print(specCounts);
|
||||||
|
} else {
|
||||||
|
print('No specs found');
|
||||||
}
|
}
|
||||||
|
|
||||||
print(specCounts);
|
|
||||||
|
|
||||||
printNewline();
|
printNewline();
|
||||||
var seconds = timer.elapsed() / 1000;
|
var seconds = timer.elapsed() / 1000;
|
||||||
print('Finished in ' + seconds + ' ' + plural('second', seconds));
|
print('Finished in ' + seconds + ' ' + plural('second', seconds));
|
||||||
|
|||||||
@@ -80,6 +80,18 @@ describe("ConsoleReporter", function() {
|
|||||||
expect(out.getOutput()).toEqual("*");
|
expect(out.getOutput()).toEqual("*");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("alerts user if there are no specs", function(){
|
||||||
|
var reporter = new j$.ConsoleReporter({
|
||||||
|
print: out.print
|
||||||
|
});
|
||||||
|
|
||||||
|
reporter.jasmineStarted();
|
||||||
|
out.clear();
|
||||||
|
reporter.jasmineDone();
|
||||||
|
|
||||||
|
expect(out.getOutput()).toMatch(/No specs found/);
|
||||||
|
});
|
||||||
|
|
||||||
it("reports a summary when done (singular spec and time)", function() {
|
it("reports a summary when done (singular spec and time)", function() {
|
||||||
var timerSpy = jasmine.createSpyObj('timer', ['start', 'elapsed']),
|
var timerSpy = jasmine.createSpyObj('timer', ['start', 'elapsed']),
|
||||||
reporter = new j$.ConsoleReporter({
|
reporter = new j$.ConsoleReporter({
|
||||||
|
|||||||
@@ -36,16 +36,21 @@ getJasmineRequireObj().ConsoleReporter = function() {
|
|||||||
specFailureDetails(failedSpecs[i]);
|
specFailureDetails(failedSpecs[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
printNewline();
|
if(specCount > 0) {
|
||||||
var specCounts = specCount + ' ' + plural('spec', specCount) + ', ' +
|
printNewline();
|
||||||
failureCount + ' ' + plural('failure', failureCount);
|
|
||||||
|
|
||||||
if (pendingCount) {
|
var specCounts = specCount + ' ' + plural('spec', specCount) + ', ' +
|
||||||
specCounts += ', ' + pendingCount + ' pending ' + plural('spec', pendingCount);
|
failureCount + ' ' + plural('failure', failureCount);
|
||||||
|
|
||||||
|
if (pendingCount) {
|
||||||
|
specCounts += ', ' + pendingCount + ' pending ' + plural('spec', pendingCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
print(specCounts);
|
||||||
|
} else {
|
||||||
|
print('No specs found');
|
||||||
}
|
}
|
||||||
|
|
||||||
print(specCounts);
|
|
||||||
|
|
||||||
printNewline();
|
printNewline();
|
||||||
var seconds = timer.elapsed() / 1000;
|
var seconds = timer.elapsed() / 1000;
|
||||||
print('Finished in ' + seconds + ' ' + plural('second', seconds));
|
print('Finished in ' + seconds + ' ' + plural('second', seconds));
|
||||||
|
|||||||
Reference in New Issue
Block a user