Console reporter prints out failed expectation's message

Previously, was only printing out the stack while the html reporter
would print out the message as well as the stack. Now they should be
more consistent.

As noticed by @despairblue in #638
This commit is contained in:
Sheel Choksi
2014-07-27 18:31:47 -07:00
parent 760b50d969
commit ee09301d8d
3 changed files with 3 additions and 0 deletions

View File

@@ -154,6 +154,7 @@ getJasmineRequireObj().ConsoleReporter = function() {
for (var i = 0; i < result.failedExpectations.length; i++) {
var failedExpectation = result.failedExpectations[i];
printNewline();
print(indent(failedExpectation.message, 2));
print(indent(failedExpectation.stack, 2));
}

View File

@@ -173,6 +173,7 @@ describe("ConsoleReporter", function() {
reporter.jasmineDone({});
expect(out.getOutput()).toMatch(/true to be false/);
expect(out.getOutput()).toMatch(/foo bar baz/);
});

View File

@@ -119,6 +119,7 @@ getJasmineRequireObj().ConsoleReporter = function() {
for (var i = 0; i < result.failedExpectations.length; i++) {
var failedExpectation = result.failedExpectations[i];
printNewline();
print(indent(failedExpectation.message, 2));
print(indent(failedExpectation.stack, 2));
}