aboutsummaryrefslogtreecommitdiffstats
path: root/test/exchange_wrapper_test.ts
diff options
context:
space:
mode:
authorLeonid <logvinov.leon@gmail.com>2017-06-10 19:57:04 +0800
committerGitHub <noreply@github.com>2017-06-10 19:57:04 +0800
commit669396e7a97c8db9f3195079fd30afc1062be039 (patch)
treeb1ecf83f2c66fd273fef915efc51c0a68016d70a /test/exchange_wrapper_test.ts
parent03a4ce90fc84edb504a095c4dee04b7efdac8d34 (diff)
parent0e971fcc89735f2c0c681a43a53904890b965faa (diff)
downloaddexon-sol-tools-669396e7a97c8db9f3195079fd30afc1062be039.tar
dexon-sol-tools-669396e7a97c8db9f3195079fd30afc1062be039.tar.gz
dexon-sol-tools-669396e7a97c8db9f3195079fd30afc1062be039.tar.bz2
dexon-sol-tools-669396e7a97c8db9f3195079fd30afc1062be039.tar.lz
dexon-sol-tools-669396e7a97c8db9f3195079fd30afc1062be039.tar.xz
dexon-sol-tools-669396e7a97c8db9f3195079fd30afc1062be039.tar.zst
dexon-sol-tools-669396e7a97c8db9f3195079fd30afc1062be039.zip
Merge branch 'master' into remove-console-trash
Diffstat (limited to 'test/exchange_wrapper_test.ts')
-rw-r--r--test/exchange_wrapper_test.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts
index 6a511e68d..1b97d7b05 100644
--- a/test/exchange_wrapper_test.ts
+++ b/test/exchange_wrapper_test.ts
@@ -643,6 +643,22 @@ describe('ExchangeWrapper', () => {
);
})();
});
+ it('Should receive the LogCancel event when an order is cancelled', (done: DoneCallback) => {
+ (async () => {
+ const subscriptionOpts: SubscriptionOpts = {
+ fromBlock: 0,
+ toBlock: 'latest',
+ };
+ await zeroEx.exchange.subscribeAsync(ExchangeEvents.LogCancel, subscriptionOpts,
+ indexFilterValues, (err: Error, event: ContractEvent) => {
+ expect(err).to.be.null();
+ expect(event).to.not.be.undefined();
+ done();
+ });
+ const cancelTakerAmountInBaseUnits = new BigNumber(1);
+ await zeroEx.exchange.cancelOrderAsync(signedOrder, cancelTakerAmountInBaseUnits);
+ })();
+ });
it('Outstanding subscriptions are cancelled when zeroEx.setProviderAsync called', (done: DoneCallback) => {
(async () => {
const subscriptionOpts: SubscriptionOpts = {