aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-06-05 20:12:20 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-06-05 20:12:20 +0800
commit592cab8d3f487450943d5f6e31815939f581bb96 (patch)
treee45c5fd496450cf0af269ba359b516ad55f5313b
parenteb5c9ae70886cb1a14ae154f363f052a76b24479 (diff)
downloaddexon-sol-tools-592cab8d3f487450943d5f6e31815939f581bb96.tar
dexon-sol-tools-592cab8d3f487450943d5f6e31815939f581bb96.tar.gz
dexon-sol-tools-592cab8d3f487450943d5f6e31815939f581bb96.tar.bz2
dexon-sol-tools-592cab8d3f487450943d5f6e31815939f581bb96.tar.lz
dexon-sol-tools-592cab8d3f487450943d5f6e31815939f581bb96.tar.xz
dexon-sol-tools-592cab8d3f487450943d5f6e31815939f581bb96.tar.zst
dexon-sol-tools-592cab8d3f487450943d5f6e31815939f581bb96.zip
Add a couple of awaits and returns for async tests
-rw-r--r--test/exchange_wrapper_test.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts
index 4f3a48b26..c4e6e308b 100644
--- a/test/exchange_wrapper_test.ts
+++ b/test/exchange_wrapper_test.ts
@@ -361,7 +361,7 @@ describe('ExchangeWrapper', () => {
describe('#getUnavailableTakerAmountAsync', () => {
it ('should throw if passed an invalid orderHash', async () => {
const invalidOrderHashHex = '0x123';
- expect(zeroEx.exchange.getUnavailableTakerAmountAsync(invalidOrderHashHex)).to.be.rejected();
+ return expect(zeroEx.exchange.getUnavailableTakerAmountAsync(invalidOrderHashHex)).to.be.rejected();
});
it ('should return zero if passed a valid but non-existent orderHash', async () => {
const unavailableValueT = await zeroEx.exchange.getUnavailableTakerAmountAsync(NON_EXISTENT_ORDER_HASH);
@@ -376,7 +376,7 @@ describe('ExchangeWrapper', () => {
describe('#getFilledTakerAmountAsync', () => {
it ('should throw if passed an invalid orderHash', async () => {
const invalidOrderHashHex = '0x123';
- expect(zeroEx.exchange.getFilledTakerAmountAsync(invalidOrderHashHex)).to.be.rejected();
+ return expect(zeroEx.exchange.getFilledTakerAmountAsync(invalidOrderHashHex)).to.be.rejected();
});
it ('should return zero if passed a valid but non-existent orderHash', async () => {
const filledValueT = await zeroEx.exchange.getFilledTakerAmountAsync(NON_EXISTENT_ORDER_HASH);
@@ -391,7 +391,7 @@ describe('ExchangeWrapper', () => {
describe('#getCanceledTakerAmountAsync', () => {
it ('should throw if passed an invalid orderHash', async () => {
const invalidOrderHashHex = '0x123';
- expect(zeroEx.exchange.getCanceledTakerAmountAsync(invalidOrderHashHex)).to.be.rejected();
+ return expect(zeroEx.exchange.getCanceledTakerAmountAsync(invalidOrderHashHex)).to.be.rejected();
});
it ('should return zero if passed a valid but non-existent orderHash', async () => {
const cancelledValueT = await zeroEx.exchange.getCanceledTakerAmountAsync(NON_EXISTENT_ORDER_HASH);
@@ -427,7 +427,7 @@ describe('ExchangeWrapper', () => {
);
});
afterEach(async () => {
- (zeroEx.exchange as any).stopWatchingExchangeLogEventsAsync();
+ await (zeroEx.exchange as any).stopWatchingExchangeLogEventsAsync();
});
// Hack: Mocha does not allow a test to be both async and have a `done` callback
// Since we need to await the receipt of the event in the `subscribeAsync` callback,