aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/test
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-11-23 03:13:34 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-11-24 05:13:37 +0800
commit8935146240838fc84c9b73308908119f9567e6b3 (patch)
tree11ab4be6bbc0ea1fc47a91e03faf6ff9754e021c /packages/0x.js/test
parent66aaceea915b6412c8ff8bcb5001363da8aaca39 (diff)
downloaddexon-0x-contracts-8935146240838fc84c9b73308908119f9567e6b3.tar
dexon-0x-contracts-8935146240838fc84c9b73308908119f9567e6b3.tar.gz
dexon-0x-contracts-8935146240838fc84c9b73308908119f9567e6b3.tar.bz2
dexon-0x-contracts-8935146240838fc84c9b73308908119f9567e6b3.tar.lz
dexon-0x-contracts-8935146240838fc84c9b73308908119f9567e6b3.tar.xz
dexon-0x-contracts-8935146240838fc84c9b73308908119f9567e6b3.tar.zst
dexon-0x-contracts-8935146240838fc84c9b73308908119f9567e6b3.zip
Make exchange subscriptions non-async
Diffstat (limited to 'packages/0x.js/test')
-rw-r--r--packages/0x.js/test/exchange_wrapper_test.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/0x.js/test/exchange_wrapper_test.ts b/packages/0x.js/test/exchange_wrapper_test.ts
index c1f9316c4..8b89baa67 100644
--- a/packages/0x.js/test/exchange_wrapper_test.ts
+++ b/packages/0x.js/test/exchange_wrapper_test.ts
@@ -617,7 +617,7 @@ describe('ExchangeWrapper', () => {
});
});
});
- describe('#subscribeAsync', () => {
+ describe('#subscribe', () => {
const indexFilterValues = {};
const shouldThrowOnInsufficientBalanceOrAllowance = true;
let makerTokenAddress: string;
@@ -656,7 +656,7 @@ describe('ExchangeWrapper', () => {
expect(logEvent.log.event).to.be.equal(ExchangeEvents.LogFill);
done();
};
- await zeroEx.exchange.subscribeAsync(
+ zeroEx.exchange.subscribe(
ExchangeEvents.LogFill, indexFilterValues, callback,
);
await zeroEx.exchange.fillOrderAsync(
@@ -672,7 +672,7 @@ describe('ExchangeWrapper', () => {
expect(logEvent.log.event).to.be.equal(ExchangeEvents.LogCancel);
done();
};
- await zeroEx.exchange.subscribeAsync(
+ zeroEx.exchange.subscribe(
ExchangeEvents.LogCancel, indexFilterValues, callback,
);
await zeroEx.exchange.cancelOrderAsync(signedOrder, cancelTakerAmountInBaseUnits);
@@ -684,7 +684,7 @@ describe('ExchangeWrapper', () => {
const callbackNeverToBeCalled = (err: Error, logEvent: DecodedLogEvent<LogFillContractEventArgs>) => {
done(new Error('Expected this subscription to have been cancelled'));
};
- await zeroEx.exchange.subscribeAsync(
+ zeroEx.exchange.subscribe(
ExchangeEvents.LogFill, indexFilterValues, callbackNeverToBeCalled,
);
@@ -695,7 +695,7 @@ describe('ExchangeWrapper', () => {
expect(logEvent.log.event).to.be.equal(ExchangeEvents.LogFill);
done();
};
- await zeroEx.exchange.subscribeAsync(
+ zeroEx.exchange.subscribe(
ExchangeEvents.LogFill, indexFilterValues, callback,
);
await zeroEx.exchange.fillOrderAsync(
@@ -709,7 +709,7 @@ describe('ExchangeWrapper', () => {
const callbackNeverToBeCalled = (err: Error, logEvent: DecodedLogEvent<LogFillContractEventArgs>) => {
done(new Error('Expected this subscription to have been cancelled'));
};
- const subscriptionToken = await zeroEx.exchange.subscribeAsync(
+ const subscriptionToken = zeroEx.exchange.subscribe(
ExchangeEvents.LogFill, indexFilterValues, callbackNeverToBeCalled,
);
zeroEx.exchange.unsubscribe(subscriptionToken);