aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-03-10 13:07:55 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-03-12 10:37:30 +0800
commitbd7517cfd489a9789f81c247fb45329881274d15 (patch)
tree9542a28ddb23f971330cc5c2b6088a4e4e102792 /packages/contracts
parent9bffce9dc55030a3901b7be61a5dbbdc80d09a4b (diff)
downloaddexon-0x-contracts-bd7517cfd489a9789f81c247fb45329881274d15.tar
dexon-0x-contracts-bd7517cfd489a9789f81c247fb45329881274d15.tar.gz
dexon-0x-contracts-bd7517cfd489a9789f81c247fb45329881274d15.tar.bz2
dexon-0x-contracts-bd7517cfd489a9789f81c247fb45329881274d15.tar.lz
dexon-0x-contracts-bd7517cfd489a9789f81c247fb45329881274d15.tar.xz
dexon-0x-contracts-bd7517cfd489a9789f81c247fb45329881274d15.tar.zst
dexon-0x-contracts-bd7517cfd489a9789f81c247fb45329881274d15.zip
Add support for async calls under coverage
Diffstat (limited to 'packages/contracts')
-rw-r--r--packages/contracts/test/token_registry.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/packages/contracts/test/token_registry.ts b/packages/contracts/test/token_registry.ts
index 5313ec1b1..9dcc77b82 100644
--- a/packages/contracts/test/token_registry.ts
+++ b/packages/contracts/test/token_registry.ts
@@ -142,8 +142,10 @@ describe('TokenRegistry', () => {
await tokenReg.setTokenName.sendTransactionAsync(token1.address, token2.name, {
from: owner,
});
- const newData = await tokenRegWrapper.getTokenByNameAsync(token2.name);
- const oldData = await tokenRegWrapper.getTokenByNameAsync(token1.name);
+ const [newData, oldData] = await Promise.all([
+ tokenRegWrapper.getTokenByNameAsync(token2.name),
+ tokenRegWrapper.getTokenByNameAsync(token1.name),
+ ]);
const expectedNewData = _.assign({}, token1, { name: token2.name });
const expectedOldData = nullToken;
@@ -177,8 +179,10 @@ describe('TokenRegistry', () => {
it('should change the token symbol when called by owner', async () => {
await tokenReg.setTokenSymbol.sendTransactionAsync(token1.address, token2.symbol, { from: owner });
- const newData = await tokenRegWrapper.getTokenBySymbolAsync(token2.symbol);
- const oldData = await tokenRegWrapper.getTokenBySymbolAsync(token1.symbol);
+ const [newData, oldData] = await Promise.all([
+ tokenRegWrapper.getTokenBySymbolAsync(token2.symbol),
+ tokenRegWrapper.getTokenBySymbolAsync(token1.symbol),
+ ]);
const expectedNewData = _.assign({}, token1, { symbol: token2.symbol });
const expectedOldData = nullToken;