Skip to content

Commit

Permalink
Reverse engineer error for at prop too
Browse files Browse the repository at this point in the history
  • Loading branch information
fongandrew committed Sep 10, 2017
1 parent d165142 commit 1eba217
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/double_end.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ test(function (t) {
to._onTimeout = doEnd;

var stackExpected;
var atExpected;
try {
to._onTimeout();
}
catch (e) {
stackExpected = stripFullStack(e.stack).split('\n')[1];
stackExpected = stackExpected.replace('double_end.js', 'double_end/double.js');
stackExpected = stackExpected.trim();
atExpected = stackExpected.replace(/^at\s+/, 'at: ');
}

var stripped = stripFullStack(body.toString('utf8'));
Expand All @@ -41,7 +43,7 @@ test(function (t) {
'not ok 2 .end() called twice',
' ---',
' operator: fail',
' at: Timeout.doEnd [as _onTimeout] ($TEST/double_end/double.js:$LINE:$COL)',
' ' + atExpected,
' stack: |-',
' Error: .end() called twice',
' [... stack stripped ...]',
Expand Down

0 comments on commit 1eba217

Please sign in to comment.