File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -533,7 +533,7 @@ if (Promise.prototype.finally) {
533
533
534
534
test ( 'finally function is executed on failure' , async t => {
535
535
let called = false ;
536
- const err = await t . throws ( m ( 'exit' , [ '2' ] ) . finally ( ( ) => {
536
+ const err = await t . throwsAsync ( m ( 'exit' , [ '2' ] ) . finally ( ( ) => {
537
537
called = true ;
538
538
} ) ) ;
539
539
t . is ( called , true ) ;
@@ -542,14 +542,14 @@ if (Promise.prototype.finally) {
542
542
} ) ;
543
543
544
544
test ( 'throw in finally function bubbles up on success' , async t => {
545
- const result = await t . throws ( m ( 'noop' , [ 'foo' ] ) . finally ( ( ) => {
545
+ const result = await t . throwsAsync ( m ( 'noop' , [ 'foo' ] ) . finally ( ( ) => {
546
546
throw new Error ( 'called' ) ;
547
547
} ) ) ;
548
548
t . is ( result . message , 'called' ) ;
549
549
} ) ;
550
550
551
551
test ( 'throw in finally bubbles up on error' , async t => {
552
- const result = await t . throws ( m ( 'exit' , [ '2' ] ) . finally ( ( ) => {
552
+ const result = await t . throwsAsync ( m ( 'exit' , [ '2' ] ) . finally ( ( ) => {
553
553
throw new Error ( 'called' ) ;
554
554
} ) ) ;
555
555
t . is ( result . message , 'called' ) ;
You can’t perform that action at this time.
0 commit comments