aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test/ts/ether_token.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-12-22 22:05:32 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-01-03 18:37:38 +0800
commite744e4cd989bd3ae1070c59f7baa8097f18b8b06 (patch)
treea7fde03873f3c1b8689d3991edbb362f8022e5f0 /packages/contracts/test/ts/ether_token.ts
parent9a96e8c704b6f84e00bbe848159a4819844cf09d (diff)
downloaddexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar.gz
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar.bz2
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar.lz
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar.xz
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar.zst
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.zip
Apply prettier config
Diffstat (limited to 'packages/contracts/test/ts/ether_token.ts')
-rw-r--r--packages/contracts/test/ts/ether_token.ts29
1 files changed, 16 insertions, 13 deletions
diff --git a/packages/contracts/test/ts/ether_token.ts b/packages/contracts/test/ts/ether_token.ts
index 99630583f..98f477838 100644
--- a/packages/contracts/test/ts/ether_token.ts
+++ b/packages/contracts/test/ts/ether_token.ts
@@ -1,15 +1,15 @@
-import {ZeroEx, ZeroExError} from '0x.js';
-import {promisify} from '@0xproject/utils';
-import {BigNumber} from 'bignumber.js';
+import { ZeroEx, ZeroExError } from '0x.js';
+import { promisify } from '@0xproject/utils';
+import { BigNumber } from 'bignumber.js';
import * as chai from 'chai';
import Web3 = require('web3');
-import {Artifacts} from '../../util/artifacts';
-import {constants} from '../../util/constants';
+import { Artifacts } from '../../util/artifacts';
+import { constants } from '../../util/constants';
-import {chaiSetup} from './utils/chai_setup';
+import { chaiSetup } from './utils/chai_setup';
-const {EtherToken} = new Artifacts(artifacts);
+const { EtherToken } = new Artifacts(artifacts);
chaiSetup.configure();
const expect = chai.expect;
@@ -44,8 +44,9 @@ contract('EtherToken', (accounts: string[]) => {
const initEthBalance = await getEthBalanceAsync(account);
const ethToDeposit = initEthBalance.plus(1);
- return expect(zeroEx.etherToken.depositAsync(etherTokenAddress, ethToDeposit, account))
- .to.be.rejectedWith(ZeroExError.InsufficientEthBalanceForDeposit);
+ return expect(zeroEx.etherToken.depositAsync(etherTokenAddress, ethToDeposit, account)).to.be.rejectedWith(
+ ZeroExError.InsufficientEthBalanceForDeposit,
+ );
});
it('should convert deposited Ether to wrapped Ether tokens', async () => {
@@ -71,8 +72,9 @@ contract('EtherToken', (accounts: string[]) => {
const initEthTokenBalance = await zeroEx.token.getBalanceAsync(etherTokenAddress, account);
const ethTokensToWithdraw = initEthTokenBalance.plus(1);
- return expect(zeroEx.etherToken.withdrawAsync(etherTokenAddress, ethTokensToWithdraw, account))
- .to.be.rejectedWith(ZeroExError.InsufficientWEthBalanceForWithdrawal);
+ return expect(
+ zeroEx.etherToken.withdrawAsync(etherTokenAddress, ethTokensToWithdraw, account),
+ ).to.be.rejectedWith(ZeroExError.InsufficientWEthBalanceForWithdrawal);
});
it('should convert ether tokens to ether with sufficient balance', async () => {
@@ -89,8 +91,9 @@ contract('EtherToken', (accounts: string[]) => {
const finalEthBalance = await getEthBalanceAsync(account);
const finalEthTokenBalance = await zeroEx.token.getBalanceAsync(etherTokenAddress, account);
- expect(finalEthBalance).to.be.bignumber
- .equal(initEthBalance.plus(ethTokensToWithdraw.minus(ethSpentOnGas)));
+ expect(finalEthBalance).to.be.bignumber.equal(
+ initEthBalance.plus(ethTokensToWithdraw.minus(ethSpentOnGas)),
+ );
expect(finalEthTokenBalance).to.be.bignumber.equal(initEthTokenBalance.minus(ethTokensToWithdraw));
});
});