File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -49,14 +49,22 @@ class AssertionError extends Error {
49
49
50
50
if ( opts . stack ) {
51
51
this . stack = opts . stack ;
52
+ } else {
53
+ const limitBefore = Error . stackTraceLimit ;
54
+ Error . stackTraceLimit = Infinity ;
55
+ Error . captureStackTrace ( this ) ;
56
+ Error . stackTraceLimit = limitBefore ;
52
57
}
53
58
}
54
59
}
55
60
exports . AssertionError = AssertionError ;
56
61
57
62
function getStack ( ) {
63
+ const limitBefore = Error . stackTraceLimit ;
64
+ Error . stackTraceLimit = Infinity ;
58
65
const obj = { } ;
59
66
Error . captureStackTrace ( obj , getStack ) ;
67
+ Error . stackTraceLimit = limitBefore ;
60
68
return obj . stack ;
61
69
}
62
70
Original file line number Diff line number Diff line change @@ -23,8 +23,6 @@ worker.setRunner(runner);
23
23
// that no more tests should be logged
24
24
let isFailed = false ;
25
25
26
- Error . stackTraceLimit = Infinity ;
27
-
28
26
function test ( props ) {
29
27
if ( isFailed ) {
30
28
return ;
You can’t perform that action at this time.
0 commit comments