Permalink
Browse files

Merge branch 'beforeAll' into master

Conflicts:
	lib/jasmine-core/boot.js
	lib/jasmine-core/boot/boot.js
	lib/jasmine-core/jasmine.css
	lib/jasmine-core/jasmine.js
	spec/core/SpecSpec.js
	spec/core/SuiteSpec.js
	spec/core/integration/EnvSpec.js
	spec/node_suite.js
	src/core/Env.js
	src/core/requireCore.js
	src/core/util.js
  • Loading branch information...
slackersoft committed Sep 25, 2014
2 parents f703539 + 1290d93 commit ba0982d89f6d2a6523e505f062638a708ac0c25e
View
@@ -54,7 +54,8 @@ getJasmineRequireObj().ConsoleReporter = function() {
red: '\x1B[31m',
yellow: '\x1B[33m',
none: '\x1B[0m'
};
},
failedSuites = [];
this.jasmineStarted = function() {
specCount = 0;
@@ -89,9 +90,12 @@ getJasmineRequireObj().ConsoleReporter = function() {
printNewline();
var seconds = timer.elapsed() / 1000;
print('Finished in ' + seconds + ' ' + plural('second', seconds));
printNewline();
for(i = 0; i < failedSuites.length; i++) {
suiteFailureDetails(failedSuites[i]);
}
onComplete(failureCount === 0);
};
@@ -116,6 +120,13 @@ getJasmineRequireObj().ConsoleReporter = function() {
}
};
this.suiteDone = function(result) {
if (result.failedExpectations && result.failedExpectations.length > 0) {
failureCount++;
failedSuites.push(result);
}
};
return this;
function printNewline() {
@@ -160,6 +171,17 @@ getJasmineRequireObj().ConsoleReporter = function() {
printNewline();
}
function suiteFailureDetails(result) {
for (var i = 0; i < result.failedExpectations.length; i++) {
printNewline();
print(colored('red', 'An error was thrown in an afterAll'));
printNewline();
print(colored('red', 'AfterAll ' + result.failedExpectations[i].message));
}
printNewline();
}
}
return ConsoleReporter;
@@ -46,7 +46,8 @@ jasmineRequire.HtmlReporter = function(j$) {
failureCount = 0,
pendingSpecCount = 0,
htmlReporterMain,
symbols;
symbols,
failedSuites = [];
this.initialize = function() {
clearPrior();
@@ -83,6 +84,10 @@ jasmineRequire.HtmlReporter = function(j$) {
};
this.suiteDone = function(result) {
if (result.failedExpectations && result.failedExpectations.length > 0) {
failedSuites.push(result);
}
if (currentParent == topResults) {
return;
}
@@ -178,6 +183,15 @@ jasmineRequire.HtmlReporter = function(j$) {
alert.appendChild(createDom('span', {className: statusBarClassName}, statusBarMessage));
for(i = 0; i < failedSuites.length; i++) {
var failedSuite = failedSuites[i];
for(var j = 0; j < failedSuite.failedExpectations.length; j++) {
var errorBarMessage = 'AfterAll ' + failedSuite.failedExpectations[j].message;
var errorBarClassName = 'bar errored';
alert.appendChild(createDom('span', {className: errorBarClassName}, errorBarMessage));
}
}
var results = find('.results');
results.appendChild(summary);

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit ba0982d

Please sign in to comment.