aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-07-04 09:26:31 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-07-04 09:26:31 +0800
commit7d7bef2b1a83a570be58c8c0c90c9e338c3b93f3 (patch)
tree29127c7e5a0006c542ec7718ba36a64e092417fe /test
parent7b248096988e70c01cb6960846a27e9ad5a7ffda (diff)
downloaddexon-sol-tools-7d7bef2b1a83a570be58c8c0c90c9e338c3b93f3.tar
dexon-sol-tools-7d7bef2b1a83a570be58c8c0c90c9e338c3b93f3.tar.gz
dexon-sol-tools-7d7bef2b1a83a570be58c8c0c90c9e338c3b93f3.tar.bz2
dexon-sol-tools-7d7bef2b1a83a570be58c8c0c90c9e338c3b93f3.tar.lz
dexon-sol-tools-7d7bef2b1a83a570be58c8c0c90c9e338c3b93f3.tar.xz
dexon-sol-tools-7d7bef2b1a83a570be58c8c0c90c9e338c3b93f3.tar.zst
dexon-sol-tools-7d7bef2b1a83a570be58c8c0c90c9e338c3b93f3.zip
Handle errors from pseudo-async subscription tests
Diffstat (limited to 'test')
-rw-r--r--test/exchange_wrapper_test.ts10
-rw-r--r--test/token_wrapper_test.ts10
2 files changed, 10 insertions, 10 deletions
diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts
index 3a88db5c9..0321eb569 100644
--- a/test/exchange_wrapper_test.ts
+++ b/test/exchange_wrapper_test.ts
@@ -721,7 +721,7 @@ describe('ExchangeWrapper', () => {
await zeroEx.exchange.fillOrderAsync(
signedOrder, fillTakerAmountInBaseUnits, shouldCheckTransfer, takerAddress,
);
- })();
+ })().catch(done);
});
it('Should receive the LogCancel event when an order is cancelled', (done: DoneCallback) => {
(async () => {
@@ -735,7 +735,7 @@ describe('ExchangeWrapper', () => {
done();
});
await zeroEx.exchange.cancelOrderAsync(signedOrder, cancelTakerAmountInBaseUnits);
- })();
+ })().catch(done);
});
it('Outstanding subscriptions are cancelled when zeroEx.setProviderAsync called', (done: DoneCallback) => {
(async () => {
@@ -761,7 +761,7 @@ describe('ExchangeWrapper', () => {
await zeroEx.exchange.fillOrderAsync(
signedOrder, fillTakerAmountInBaseUnits, shouldCheckTransfer, takerAddress,
);
- })();
+ })().catch(done);
});
it('Should stop watch for events when stopWatchingAsync called on the eventEmitter', (done: DoneCallback) => {
(async () => {
@@ -776,7 +776,7 @@ describe('ExchangeWrapper', () => {
signedOrder, fillTakerAmountInBaseUnits, shouldCheckTransfer, takerAddress,
);
done();
- })();
+ })().catch(done);
});
it('Should wrap all event args BigNumber instances in a newer version of BigNumber', (done: DoneCallback) => {
(async () => {
@@ -794,7 +794,7 @@ describe('ExchangeWrapper', () => {
await zeroEx.exchange.fillOrderAsync(
signedOrder, fillTakerAmountInBaseUnits, shouldCheckTransfer, takerAddress,
);
- })();
+ })().catch(done);
});
});
describe('#getOrderHashHexUsingContractCallAsync', () => {
diff --git a/test/token_wrapper_test.ts b/test/token_wrapper_test.ts
index 4a20141db..c5a08dc43 100644
--- a/test/token_wrapper_test.ts
+++ b/test/token_wrapper_test.ts
@@ -277,7 +277,7 @@ describe('TokenWrapper', () => {
done();
});
await zeroEx.token.transferAsync(tokenAddress, coinbase, addressWithoutFunds, transferAmount);
- })();
+ })().catch(done);
});
it('Should receive the Approval event when an order is cancelled', (done: DoneCallback) => {
(async () => {
@@ -294,7 +294,7 @@ describe('TokenWrapper', () => {
done();
});
await zeroEx.token.setAllowanceAsync(tokenAddress, coinbase, addressWithoutFunds, allowanceAmount);
- })();
+ })().catch(done);
});
it('Outstanding subscriptions are cancelled when zeroEx.setProviderAsync called', (done: DoneCallback) => {
(async () => {
@@ -315,7 +315,7 @@ describe('TokenWrapper', () => {
done();
});
await zeroEx.token.transferAsync(tokenAddress, coinbase, addressWithoutFunds, transferAmount);
- })();
+ })().catch(done);
});
it('Should stop watch for events when stopWatchingAsync called on the eventEmitter', (done: DoneCallback) => {
(async () => {
@@ -327,7 +327,7 @@ describe('TokenWrapper', () => {
await eventSubscriptionToBeStopped.stopWatchingAsync();
await zeroEx.token.transferAsync(tokenAddress, coinbase, addressWithoutFunds, transferAmount);
done();
- })();
+ })().catch(done);
});
it('Should wrap all event args BigNumber instances in a newer version of BigNumber', (done: DoneCallback) => {
(async () => {
@@ -339,7 +339,7 @@ describe('TokenWrapper', () => {
done();
});
await zeroEx.token.transferAsync(tokenAddress, coinbase, addressWithoutFunds, transferAmount);
- })();
+ })().catch(done);
});
});
});