diff options
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); |