diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-21 06:39:34 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-21 06:39:34 +0800 |
commit | 3e0371685fe16b7dc96f5f900c0d4531b16370d4 (patch) | |
tree | 4f8bb59af73309efd9676aeb680ee09bac8fb157 /packages/0x.js/test/utils | |
parent | 3bc3666215d4fdaa6d9db87e065ca5e762df9b25 (diff) | |
download | dexon-sol-tools-3e0371685fe16b7dc96f5f900c0d4531b16370d4.tar dexon-sol-tools-3e0371685fe16b7dc96f5f900c0d4531b16370d4.tar.gz dexon-sol-tools-3e0371685fe16b7dc96f5f900c0d4531b16370d4.tar.bz2 dexon-sol-tools-3e0371685fe16b7dc96f5f900c0d4531b16370d4.tar.lz dexon-sol-tools-3e0371685fe16b7dc96f5f900c0d4531b16370d4.tar.xz dexon-sol-tools-3e0371685fe16b7dc96f5f900c0d4531b16370d4.tar.zst dexon-sol-tools-3e0371685fe16b7dc96f5f900c0d4531b16370d4.zip |
Fix async callbacks
Diffstat (limited to 'packages/0x.js/test/utils')
-rw-r--r-- | packages/0x.js/test/utils/report_callback_errors.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/0x.js/test/utils/report_callback_errors.ts b/packages/0x.js/test/utils/report_callback_errors.ts index d471b2af2..4f9517704 100644 --- a/packages/0x.js/test/utils/report_callback_errors.ts +++ b/packages/0x.js/test/utils/report_callback_errors.ts @@ -1,10 +1,10 @@ import { DoneCallback } from '../../src/types'; export const reportCallbackErrors = (done: DoneCallback) => { - return (f: (...args: any[]) => void) => { - const wrapped = (...args: any[]) => { + return (fAsync: (...args: any[]) => void|Promise<void>) => { + const wrapped = async (...args: any[]) => { try { - f(...args); + await fAsync(...args); } catch (err) { done(err); } |