aboutsummaryrefslogtreecommitdiffstats
path: root/test/token_wrapper_test.ts
diff options
context:
space:
mode:
authorLeonid <logvinov.leon@gmail.com>2017-09-06 16:28:37 +0800
committerGitHub <noreply@github.com>2017-09-06 16:28:37 +0800
commitf0a5ad2d2063fe8ba4682147ec2f73e2763b0275 (patch)
tree6b6c4e4e8a5b367f39687bf4fc7e9bbc237b4874 /test/token_wrapper_test.ts
parent0275ac9dada35648ffb3b543f6ba2546117a3b63 (diff)
parent258b4fac31aee1bc0c26e42d62b10bd22c69c1b8 (diff)
downloaddexon-0x-contracts-f0a5ad2d2063fe8ba4682147ec2f73e2763b0275.tar.gz
dexon-0x-contracts-f0a5ad2d2063fe8ba4682147ec2f73e2763b0275.tar.zst
dexon-0x-contracts-f0a5ad2d2063fe8ba4682147ec2f73e2763b0275.zip
Merge pull request #151 from 0xProject/feature/remove-truffle-contracts
Remove truffle contracts dependency
Diffstat (limited to 'test/token_wrapper_test.ts')
-rw-r--r--test/token_wrapper_test.ts7
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);