aboutsummaryrefslogtreecommitdiffstats
path: root/test/0x.js_test.ts
diff options
context:
space:
mode:
authorLeonid <logvinov.leon@gmail.com>2017-10-13 22:16:11 +0800
committerGitHub <noreply@github.com>2017-10-13 22:16:11 +0800
commit5591378245184178dd1a1997076bb1cbb17ddcb1 (patch)
tree0ce4bebb4c038748e04f791cda501543018113df /test/0x.js_test.ts
parentba654c04a086b8c4ce4330b3d6064716a4090599 (diff)
parentdde2268f9fad24ad8baee88eca7aef068d05c178 (diff)
downloaddexon-sol-tools-5591378245184178dd1a1997076bb1cbb17ddcb1.tar
dexon-sol-tools-5591378245184178dd1a1997076bb1cbb17ddcb1.tar.gz
dexon-sol-tools-5591378245184178dd1a1997076bb1cbb17ddcb1.tar.bz2
dexon-sol-tools-5591378245184178dd1a1997076bb1cbb17ddcb1.tar.lz
dexon-sol-tools-5591378245184178dd1a1997076bb1cbb17ddcb1.tar.xz
dexon-sol-tools-5591378245184178dd1a1997076bb1cbb17ddcb1.tar.zst
dexon-sol-tools-5591378245184178dd1a1997076bb1cbb17ddcb1.zip
Merge pull request #194 from 0xProject/feature/type-safe-subscriptions
Make logs fetching and subscriptions more type-safe
Diffstat (limited to 'test/0x.js_test.ts')
-rw-r--r--test/0x.js_test.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/0x.js_test.ts b/test/0x.js_test.ts
index cc6b91e99..dd5dd19b1 100644
--- a/test/0x.js_test.ts
+++ b/test/0x.js_test.ts
@@ -4,7 +4,7 @@ import {chaiSetup} from './utils/chai_setup';
import 'mocha';
import * as BigNumber from 'bignumber.js';
import * as Sinon from 'sinon';
-import {ZeroEx, Order, ZeroExError, LogWithDecodedArgs} from '../src';
+import {ZeroEx, Order, ZeroExError, LogWithDecodedArgs, ApprovalContractEventArgs, TokenEvents} from '../src';
import {constants} from './utils/constants';
import {TokenUtils} from './utils/token_utils';
import {web3Factory} from './utils/web3_factory';
@@ -223,8 +223,8 @@ describe('ZeroEx library', () => {
const proxyAddress = await zeroEx.proxy.getContractAddressAsync();
const txHash = await zeroEx.token.setUnlimitedProxyAllowanceAsync(zrxTokenAddress, coinbase);
const txReceiptWithDecodedLogs = await zeroEx.awaitTransactionMinedAsync(txHash);
- const log = txReceiptWithDecodedLogs.logs[0] as LogWithDecodedArgs;
- expect(log.event).to.be.equal('Approval');
+ const log = txReceiptWithDecodedLogs.logs[0] as LogWithDecodedArgs<ApprovalContractEventArgs>;
+ expect(log.event).to.be.equal(TokenEvents.Approval);
expect(log.args._owner).to.be.equal(coinbase);
expect(log.args._spender).to.be.equal(proxyAddress);
expect(log.args._value).to.be.bignumber.equal(zeroEx.token.UNLIMITED_ALLOWANCE_IN_BASE_UNITS);