diff options
author | Leonid <logvinov.leon@gmail.com> | 2017-09-06 16:35:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-06 16:35:19 +0800 |
commit | 35c133caeda613121d7d90f3f1347ebdc8087d66 (patch) | |
tree | 6156865472010078a9f27b905bcaec7782f6521c /test/token_wrapper_test.ts | |
parent | 18a52a1ea758ee5640680f1097eba1ce9a9e81fc (diff) | |
parent | f0a5ad2d2063fe8ba4682147ec2f73e2763b0275 (diff) | |
download | dexon-sol-tools-35c133caeda613121d7d90f3f1347ebdc8087d66.tar dexon-sol-tools-35c133caeda613121d7d90f3f1347ebdc8087d66.tar.gz dexon-sol-tools-35c133caeda613121d7d90f3f1347ebdc8087d66.tar.bz2 dexon-sol-tools-35c133caeda613121d7d90f3f1347ebdc8087d66.tar.lz dexon-sol-tools-35c133caeda613121d7d90f3f1347ebdc8087d66.tar.xz dexon-sol-tools-35c133caeda613121d7d90f3f1347ebdc8087d66.tar.zst dexon-sol-tools-35c133caeda613121d7d90f3f1347ebdc8087d66.zip |
Merge branch 'development' into fix/signature-verification
Diffstat (limited to 'test/token_wrapper_test.ts')
-rw-r--r-- | test/token_wrapper_test.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/token_wrapper_test.ts b/test/token_wrapper_test.ts index 88833e612..68dca0769 100644 --- a/test/token_wrapper_test.ts +++ b/test/token_wrapper_test.ts @@ -58,7 +58,8 @@ describe('TokenWrapper', () => { const toAddress = addressWithoutFunds; const preBalance = await zeroEx.token.getBalanceAsync(token.address, toAddress); expect(preBalance).to.be.bignumber.equal(0); - await zeroEx.token.transferAsync(token.address, fromAddress, toAddress, transferAmount); + const txHash = await zeroEx.token.transferAsync(token.address, fromAddress, toAddress, transferAmount); + await zeroEx.awaitTransactionMinedAsync(txHash); const postBalance = await zeroEx.token.getBalanceAsync(token.address, toAddress); return expect(postBalance).to.be.bignumber.equal(transferAmount); }); @@ -356,7 +357,7 @@ describe('TokenWrapper', () => { // we do need both. A hack is to make the top-level a sync fn w/ a done callback and then // wrap the rest of the test in an async block // Source: https://github.com/mochajs/mocha/issues/2407 - it('Should receive the Transfer event when an order is filled', (done: DoneCallback) => { + it('Should receive the Transfer event when tokens are transfered', (done: DoneCallback) => { (async () => { const zeroExEvent = await zeroEx.token.subscribeAsync( tokenAddress, TokenEvents.Transfer, subscriptionOpts, indexFilterValues); @@ -372,7 +373,7 @@ describe('TokenWrapper', () => { await zeroEx.token.transferAsync(tokenAddress, coinbase, addressWithoutFunds, transferAmount); })().catch(done); }); - it('Should receive the Approval event when an order is cancelled', (done: DoneCallback) => { + it('Should receive the Approval event when allowance is being set', (done: DoneCallback) => { (async () => { const zeroExEvent = await zeroEx.token.subscribeAsync( tokenAddress, TokenEvents.Approval, subscriptionOpts, indexFilterValues); |