Skip to content

Commit 6513984

Browse files
committedMar 5, 2019
Fix tests for #174
1 parent 136987e commit 6513984

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ if (Promise.prototype.finally) {
533533

534534
test('finally function is executed on failure', async t => {
535535
let called = false;
536-
const err = await t.throws(m('exit', ['2']).finally(() => {
536+
const err = await t.throwsAsync(m('exit', ['2']).finally(() => {
537537
called = true;
538538
}));
539539
t.is(called, true);
@@ -542,14 +542,14 @@ if (Promise.prototype.finally) {
542542
});
543543

544544
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(() => {
546546
throw new Error('called');
547547
}));
548548
t.is(result.message, 'called');
549549
});
550550

551551
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(() => {
553553
throw new Error('called');
554554
}));
555555
t.is(result.message, 'called');

0 commit comments

Comments
 (0)
Please sign in to comment.