Skip to content

Commit

Permalink
Merge pull request #1617 from danielstjules/fix-ie8
Browse files Browse the repository at this point in the history
Fix 1606: fix err handling in IE <= 8 and non-ES5 browsers
  • Loading branch information
danielstjules committed Mar 23, 2015
2 parents 3e004d1 + 537d019 commit 41a2119
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/runner.js
Expand Up @@ -206,7 +206,7 @@ Runner.prototype.fail = function(test, err) {
err = new Error('the ' + type(err) + ' ' + stringify(err) + ' was thrown, throw an Error :)');
}

err.stack = this.fullStackTrace
err.stack = (this.fullStackTrace || !err.stack)
? err.stack
: stackFilter(err.stack);

Expand Down
2 changes: 1 addition & 1 deletion lib/utils.js
Expand Up @@ -677,7 +677,7 @@ exports.stackTraceFilter = function() {
return function(stack) {
stack = stack.split('\n');

stack = stack.reduce(function (list, line) {
stack = exports.reduce(stack, function(list, line) {
if (is.node && (isNodeModule(line) ||
isMochaInternal(line) ||
isNodeInternal(line)))
Expand Down
4 changes: 2 additions & 2 deletions mocha.js
Expand Up @@ -4779,7 +4779,7 @@ Runner.prototype.fail = function(test, err) {
err = new Error('the ' + type(err) + ' ' + stringify(err) + ' was thrown, throw an Error :)');
}

err.stack = this.fullStackTrace
err.stack = (this.fullStackTrace || !err.stack)
? err.stack
: stackFilter(err.stack);

Expand Down Expand Up @@ -6372,7 +6372,7 @@ exports.stackTraceFilter = function() {
return function(stack) {
stack = stack.split('\n');

stack = stack.reduce(function (list, line) {
stack = exports.reduce(stack, function(list, line) {
if (is.node && (isNodeModule(line) ||
isMochaInternal(line) ||
isNodeInternal(line)))
Expand Down

0 comments on commit 41a2119

Please sign in to comment.