Skip to content

Commit 28dc2a9

Browse files
committed
Make error catcher return an async function
1 parent 7451ac4 commit 28dc2a9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ export const wait = (milliSeconds) =>
5858

5959
export const capitalize = (s) => `${s[0].toUpperCase}${s.slice(1)}`;
6060

61-
export const catchError = (testFn) => (t) => {
61+
export const catchError = (testFn) => async (t) => {
6262
try {
63-
testFn(t);
63+
await testFn(t);
6464
} catch (e) {
6565
t.fail(e.message);
6666
}

0 commit comments

Comments
 (0)