diff options
Diffstat (limited to 'packages/contracts')
-rw-r--r-- | packages/contracts/test/token_registry.ts | 12 |
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; |