Skip to content

Commit

Permalink
feat: set stackStartFunction to self if undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
twada committed Jun 12, 2018
1 parent d579971 commit 8d734cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function empower (assert, formatter, options) {
}
return buildPowerAssertText(formatter, message, beforeAssertEvent.powerAssertContext);
},
onError: function (errorEvent) {
onError: function onError (errorEvent) {
var e = errorEvent.error;
if (!/^AssertionError/.test(e.name)) {
throw e;
Expand All @@ -64,7 +64,7 @@ function empower (assert, formatter, options) {
actual: e.actual,
expected: e.expected,
operator: e.operator,
stackStartFunction: e.stackStartFunction
stackStartFunction: e.stackStartFunction || onError
});
}
}
Expand Down

0 comments on commit 8d734cf

Please sign in to comment.