Commit 6a4d64b committed Sep 23, 2019 Unverified
1 parent 5b977e1 commit 6a4d64b Copy full SHA for 6a4d64b
File tree 2 files changed +11
-2
lines changed
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ class Test extends Base {
346
346
timeout ( options ) {
347
347
options = options || { }
348
348
options . expired = options . expired || this . name
349
- if ( this . occupied )
349
+ if ( this . occupied && this . occupied . timeout )
350
350
this . occupied . timeout ( options )
351
351
else
352
352
Base . prototype . timeout . call ( this , options )
@@ -867,7 +867,10 @@ class Test extends Base {
867
867
// threw while waiting for a promise to resolve.
868
868
// probably it's not ever gonna.
869
869
if ( this . occupied && this . occupied instanceof Waiter )
870
- this . occupied . abort ( new Error ( 'error thrown while awaiting Promise' ) )
870
+ this . occupied . abort ( Object . assign (
871
+ new Error ( 'error thrown while awaiting Promise' ) ,
872
+ { thrown : er }
873
+ ) )
871
874
872
875
this . process ( )
873
876
}
Original file line number Diff line number Diff line change @@ -3203,6 +3203,12 @@ TAP version 13
3203
3203
message: error thrown while awaiting Promise
3204
3204
stack: |
3205
3205
{STACK}
3206
+ thrown:
3207
+ !error
3208
+ name: Error
3209
+ message: poop
3210
+ stack: |
3211
+ {STACK}
3206
3212
source: |2
3207
3213
setTimeout(() => t.threw(new Error('poop')))
3208
3214
return t.resolveMatch(() => new Promise(() => {}), 'never resolves')
You can’t perform that action at this time.
0 commit comments