removing expectation count from TCR to match browser reporter
This commit is contained in:
@@ -140,7 +140,7 @@ describe("TrivialConsoleReporter", function() {
|
|||||||
green(".") + green(".") + green("."),
|
green(".") + green(".") + green("."),
|
||||||
"",
|
"",
|
||||||
"Finished in 0.777 seconds",
|
"Finished in 0.777 seconds",
|
||||||
green("3 specs, 7 expectations, 0 failures"),
|
green("3 specs, 0 failures"),
|
||||||
""
|
""
|
||||||
].join("\n") + "\n"
|
].join("\n") + "\n"
|
||||||
);
|
);
|
||||||
@@ -185,7 +185,7 @@ describe("TrivialConsoleReporter", function() {
|
|||||||
|
|
||||||
"",
|
"",
|
||||||
"Finished in 0.777 seconds",
|
"Finished in 0.777 seconds",
|
||||||
green("3 specs, 7 expectations, 0 failures"),
|
green("3 specs, 0 failures"),
|
||||||
""
|
""
|
||||||
].join("\n") + "\n"
|
].join("\n") + "\n"
|
||||||
);
|
);
|
||||||
@@ -251,7 +251,7 @@ describe("TrivialConsoleReporter", function() {
|
|||||||
" stack trace one",
|
" stack trace one",
|
||||||
"",
|
"",
|
||||||
"Finished in 0.777 seconds",
|
"Finished in 0.777 seconds",
|
||||||
red("3 specs, 7 expectations, 2 failures"),
|
red("3 specs, 2 failures"),
|
||||||
""
|
""
|
||||||
].join("\n") + "\n"
|
].join("\n") + "\n"
|
||||||
);
|
);
|
||||||
@@ -441,7 +441,7 @@ describe("TrivialConsoleReporter", function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
expect(out.getOutput()).
|
expect(out.getOutput()).
|
||||||
toContain("3 specs, 7 expectations, 0 failures");
|
toContain("3 specs, 0 failures");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("prints statistics in red if there was a failure", function() {
|
it("prints statistics in red if there was a failure", function() {
|
||||||
@@ -454,7 +454,7 @@ describe("TrivialConsoleReporter", function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
expect(out.getOutput()).
|
expect(out.getOutput()).
|
||||||
toContain("3 specs, 7 expectations, 3 failures");
|
toContain("3 specs, 3 failures");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("handles pluralization with 1's ones appropriately", function() {
|
it("handles pluralization with 1's ones appropriately", function() {
|
||||||
@@ -467,7 +467,7 @@ describe("TrivialConsoleReporter", function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
expect(out.getOutput()).
|
expect(out.getOutput()).
|
||||||
toContain("1 spec, 1 expectation, 1 failure");
|
toContain("1 spec, 1 failure");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ jasmine.TrivialConsoleReporter = function(print, doneCallback) {
|
|||||||
},
|
},
|
||||||
language = {
|
language = {
|
||||||
spec: "spec",
|
spec: "spec",
|
||||||
expectation: "expectation",
|
|
||||||
failure: "failure"
|
failure: "failure"
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -89,21 +88,20 @@ jasmine.TrivialConsoleReporter = function(print, doneCallback) {
|
|||||||
print("Finished in " + elapsed / 1000 + " seconds");
|
print("Finished in " + elapsed / 1000 + " seconds");
|
||||||
}
|
}
|
||||||
|
|
||||||
function summary(colorF, specs, expectations, failed) {
|
function summary(colorF, specs, failed) {
|
||||||
newline();
|
newline();
|
||||||
print(colorF(specs + " " + plural(language.spec, specs) + ", " +
|
print(colorF(specs + " " + plural(language.spec, specs) + ", " +
|
||||||
expectations + " " + plural(language.expectation, expectations) + ", " +
|
|
||||||
failed + " " + plural(language.failure, failed)));
|
failed + " " + plural(language.failure, failed)));
|
||||||
newline();
|
newline();
|
||||||
newline();
|
newline();
|
||||||
}
|
}
|
||||||
|
|
||||||
function greenSummary(specs, expectations, failed) {
|
function greenSummary(specs, failed) {
|
||||||
summary(greenStr, specs, expectations, failed);
|
summary(greenStr, specs, failed);
|
||||||
}
|
}
|
||||||
|
|
||||||
function redSummary(specs, expectations, failed) {
|
function redSummary(specs, failed) {
|
||||||
summary(redStr, specs, expectations, failed);
|
summary(redStr, specs, failed);
|
||||||
}
|
}
|
||||||
|
|
||||||
function fullSuiteDescription(suite) {
|
function fullSuiteDescription(suite) {
|
||||||
@@ -173,7 +171,7 @@ jasmine.TrivialConsoleReporter = function(print, doneCallback) {
|
|||||||
|
|
||||||
var results = runner.results();
|
var results = runner.results();
|
||||||
var summaryFunction = results.failedCount === 0 ? greenSummary : redSummary;
|
var summaryFunction = results.failedCount === 0 ? greenSummary : redSummary;
|
||||||
summaryFunction(runner.specs().length, results.totalCount, results.failedCount);
|
summaryFunction(runner.specs().length, results.failedCount);
|
||||||
doneCallback(runner);
|
doneCallback(runner);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user