aboutsummaryrefslogtreecommitdiffstats
path: root/test/exchange_wrapper_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/exchange_wrapper_test.ts')
-rw-r--r--test/exchange_wrapper_test.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts
index 92e2514dd..2becd2cbe 100644
--- a/test/exchange_wrapper_test.ts
+++ b/test/exchange_wrapper_test.ts
@@ -132,9 +132,12 @@ describe('ExchangeWrapper', () => {
});
networkId = await promisify(web3.version.getNetwork)();
});
- beforeEach('setup', () => {
+ beforeEach('setup', async () => {
maker = userAddresses[0];
taker = userAddresses[1];
+ await setAllowance(maker, 5, addressBySymbol.MLN);
+ await setBalance(taker, 5, addressBySymbol.GNT);
+ await setAllowance(taker, 5, addressBySymbol.GNT);
});
afterEach('reset default account', () => {
zeroEx.setDefaultAccount(userAddresses[0]);
@@ -165,12 +168,8 @@ describe('ExchangeWrapper', () => {
});
describe('successful fills', () => {
it('should fill the valid order', async () => {
- await setAllowance(maker, 5, addressBySymbol.MLN);
- await setBalance(taker, 5, addressBySymbol.GNT);
- await setAllowance(taker, 5, addressBySymbol.GNT);
const signedOrder = await orderFactory.createSignedOrderAsync(zeroEx, networkId, maker, taker,
5, addressBySymbol.MLN, 5, addressBySymbol.GNT);
- const fillAmount = new BigNumber(5);
zeroEx.setDefaultAccount(taker);
await zeroEx.exchange.fillOrderAsync(signedOrder, fillAmount, shouldCheckTransfer);
expect(await zeroEx.token.getBalanceAsync(addressBySymbol.MLN, taker)).to.be.bignumber.equal(5);