move all "assertion" to "expectation"
This commit is contained in:
parent
ccfa17499f
commit
70aed2d900
|
@ -54,7 +54,7 @@ describe("jasmine spec running", function () {
|
|||
this.expect(foo).toEqual('baz');
|
||||
});
|
||||
|
||||
specWithMultipleExpectations = env.it('spec with multiple assertions').runs(function () {
|
||||
specWithMultipleExpectations = env.it('spec with multiple expectations').runs(function () {
|
||||
var foo = 'bar';
|
||||
var baz = 'quux';
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ describe("TrivialConsoleReporter", function() {
|
|||
green(".") + green(".") + green("."),
|
||||
"",
|
||||
"Finished in 0.777 seconds",
|
||||
green("3 specs, 7 assertions, 0 failures"),
|
||||
green("3 specs, 7 expectations, 0 failures"),
|
||||
""
|
||||
].join("\n") + "\n"
|
||||
);
|
||||
|
@ -120,7 +120,7 @@ describe("TrivialConsoleReporter", function() {
|
|||
|
||||
"",
|
||||
"Finished in 0.777 seconds",
|
||||
green("3 specs, 7 assertions, 0 failures"),
|
||||
green("3 specs, 7 expectations, 0 failures"),
|
||||
""
|
||||
].join("\n") + "\n"
|
||||
);
|
||||
|
@ -182,7 +182,7 @@ describe("TrivialConsoleReporter", function() {
|
|||
" stack trace one",
|
||||
"",
|
||||
"Finished in 0.777 seconds",
|
||||
red("3 specs, 7 assertions, 2 failures"),
|
||||
red("3 specs, 7 expectations, 2 failures"),
|
||||
""
|
||||
].join("\n") + "\n"
|
||||
);
|
||||
|
@ -386,13 +386,13 @@ describe("TrivialConsoleReporter", function() {
|
|||
});
|
||||
});
|
||||
|
||||
describe("specs/assertions/failures summary", function(){
|
||||
describe("specs/expectations/failures summary", function(){
|
||||
it("prints statistics in green if there were no failures", function() {
|
||||
this.reporter.reportRunnerResults({
|
||||
results:function(){return {items_: [null, null, null], totalCount: 7, failedCount: 0};}
|
||||
});
|
||||
expect(this.out.getOutput()).
|
||||
toContain("3 specs, 7 assertions, 0 failures");
|
||||
toContain("3 specs, 7 expectations, 0 failures");
|
||||
});
|
||||
|
||||
it("prints statistics in red if there was a failure", function() {
|
||||
|
@ -400,7 +400,7 @@ describe("TrivialConsoleReporter", function() {
|
|||
results:function(){return {items_: [null, null, null], totalCount: 7, failedCount: 3};}
|
||||
});
|
||||
expect(this.out.getOutput()).
|
||||
toContain("3 specs, 7 assertions, 3 failures");
|
||||
toContain("3 specs, 7 expectations, 3 failures");
|
||||
});
|
||||
|
||||
it("handles pluralization with 1's ones appropriately", function() {
|
||||
|
@ -408,7 +408,7 @@ describe("TrivialConsoleReporter", function() {
|
|||
results:function(){return {items_: [null], totalCount: 1, failedCount: 1};}
|
||||
});
|
||||
expect(this.out.getOutput()).
|
||||
toContain("1 spec, 1 assertion, 1 failure");
|
||||
toContain("1 spec, 1 expectation, 1 failure");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ jasmine.TrivialConsoleReporter = function(print, doneCallback) {
|
|||
|
||||
var defaultColumnsPerLine = 50,
|
||||
ansi = { green: '\033[32m', red: '\033[31m', yellow: '\033[33m', none: '\033[0m' },
|
||||
language = { spec:"spec", assertion:"assertion", failure:"failure" };
|
||||
language = { spec:"spec", expectation:"expectation", failure:"failure" };
|
||||
|
||||
function coloredStr(color, str) { return ansi[color] + str + ansi.none; }
|
||||
|
||||
|
@ -48,14 +48,14 @@ jasmine.TrivialConsoleReporter = function(print, doneCallback) {
|
|||
}
|
||||
function finished(elapsed) { newline();
|
||||
print("Finished in " + elapsed/1000 + " seconds"); }
|
||||
function summary(colorF, specs, assertions, failed) { newline();
|
||||
function summary(colorF, specs, expectations, failed) { newline();
|
||||
print(colorF(specs + " " + plural(language.spec, specs) + ", " +
|
||||
assertions + " " + plural(language.assertion, assertions) + ", " +
|
||||
expectations + " " + plural(language.expectation, expectations) + ", " +
|
||||
failed + " " + plural(language.failure, failed)));
|
||||
newline();
|
||||
newline(); }
|
||||
function greenSummary(specs, assertions, failed){ summary(greenStr, specs, assertions, failed); }
|
||||
function redSummary(specs, assertions, failed){ summary(redStr, specs, assertions, failed); }
|
||||
function greenSummary(specs, expectations, failed){ summary(greenStr, specs, expectations, failed); }
|
||||
function redSummary(specs, expectations, failed){ summary(redStr, specs, expectations, failed); }
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue