Fix issues with displaying error messages for afterAll (browser compatibility)
- Switch from showing error stack to showing message/description since only chrome/ff support stack - Fallback to error.description if error.message is undefined - Made exceptionList variable name consistent between both reporters
This commit is contained in:
@@ -52,13 +52,13 @@ getJasmineRequireObj().ConsoleReporter = function() {
|
||||
print('Finished in ' + seconds + ' ' + plural('second', seconds));
|
||||
printNewline();
|
||||
|
||||
exceptionList.forEach(function(error) {
|
||||
for(i = 0; i < exceptionList.length; i++) {
|
||||
printNewline();
|
||||
print(colored('red', 'An error was thrown in an afterAll'));
|
||||
printNewline();
|
||||
print(colored('red', error.stack));
|
||||
print(colored('red', (exceptionList[i].message || exceptionList[i].description)));
|
||||
printNewline();
|
||||
});
|
||||
}
|
||||
|
||||
onComplete(failureCount === 0);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user