aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract-wrappers/test
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-12-22 08:40:11 +0800
committerGreg Hysen <greg.hysen@gmail.com>2019-01-08 07:50:48 +0800
commitb249a50d8f0054328a901525af6316133ed64023 (patch)
tree05cd417eb5aa1cda6f4f5592f71fa03ee9482d41 /packages/contract-wrappers/test
parent0432212a346aa761c54b5a9159a7e61e0c2f9b9a (diff)
downloaddexon-sol-tools-b249a50d8f0054328a901525af6316133ed64023.tar
dexon-sol-tools-b249a50d8f0054328a901525af6316133ed64023.tar.gz
dexon-sol-tools-b249a50d8f0054328a901525af6316133ed64023.tar.bz2
dexon-sol-tools-b249a50d8f0054328a901525af6316133ed64023.tar.lz
dexon-sol-tools-b249a50d8f0054328a901525af6316133ed64023.tar.xz
dexon-sol-tools-b249a50d8f0054328a901525af6316133ed64023.tar.zst
dexon-sol-tools-b249a50d8f0054328a901525af6316133ed64023.zip
ran prettier
Diffstat (limited to 'packages/contract-wrappers/test')
-rw-r--r--packages/contract-wrappers/test/dutch_auction_wrapper_test.ts39
1 files changed, 19 insertions, 20 deletions
diff --git a/packages/contract-wrappers/test/dutch_auction_wrapper_test.ts b/packages/contract-wrappers/test/dutch_auction_wrapper_test.ts
index 697554dd1..fa5ef41fd 100644
--- a/packages/contract-wrappers/test/dutch_auction_wrapper_test.ts
+++ b/packages/contract-wrappers/test/dutch_auction_wrapper_test.ts
@@ -15,9 +15,7 @@ import { provider, web3Wrapper } from './utils/web3_wrapper';
import { getLatestBlockTimestampAsync } from '@0x/contracts-test-utils';
import { DutchAuctionUtils } from './utils/dutch_auction_utils';
-import {
- expectTransactionFailedAsync,
-} from '@0x/contracts-test-utils';
+import { expectTransactionFailedAsync } from '@0x/contracts-test-utils';
chaiSetup.configure();
const expect = chai.expect;
@@ -25,7 +23,7 @@ const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
// tslint:disable:custom-no-magic-numbers
describe.only('DutchAuctionWrapper', () => {
- const fillableAmount = new BigNumber(2);//Web3Wrapper.toBaseUnitAmount(new BigNumber(50), 18);
+ const fillableAmount = new BigNumber(2); //Web3Wrapper.toBaseUnitAmount(new BigNumber(50), 18);
const tenMinutesInSeconds = 10 * 60;
let contractWrappers: ContractWrappers;
let exchangeContractAddress: string;
@@ -69,7 +67,12 @@ describe.only('DutchAuctionWrapper', () => {
auctionEndTimeSeconds = new BigNumber(currentBlockTimestamp + tenMinutesInSeconds);
// create auction orders
const coinbase = userAddresses[0];
- const dutchAuctionUtils = new DutchAuctionUtils(web3Wrapper, coinbase, exchangeContractAddress, contractWrappers.erc20Proxy.address);
+ const dutchAuctionUtils = new DutchAuctionUtils(
+ web3Wrapper,
+ coinbase,
+ exchangeContractAddress,
+ contractWrappers.erc20Proxy.address,
+ );
sellOrder = await dutchAuctionUtils.createSignedSellOrderAsync(
auctionBeginTimeSeconds,
auctionBeginAmount,
@@ -81,10 +84,7 @@ describe.only('DutchAuctionWrapper', () => {
constants.NULL_ADDRESS,
auctionEndAmount,
);
- buyOrder = await dutchAuctionUtils.createSignedBuyOrderAsync(
- sellOrder,
- takerAddress,
- );
+ buyOrder = await dutchAuctionUtils.createSignedBuyOrderAsync(sellOrder, takerAddress);
});
after(async () => {
await blockchainLifecycle.revertAsync();
@@ -105,15 +105,10 @@ describe.only('DutchAuctionWrapper', () => {
const badSellOrder = buyOrder;
const badBuyOrder = sellOrder;
return expectTransactionFailedAsync(
- contractWrappers.dutchAuction.matchOrdersAsync(
- badBuyOrder,
- badSellOrder,
- takerAddress,
- {
- shouldValidate: true,
- },
- ),
- RevertReason.InvalidAssetData
+ contractWrappers.dutchAuction.matchOrdersAsync(badBuyOrder, badSellOrder, takerAddress, {
+ shouldValidate: true,
+ }),
+ RevertReason.InvalidAssetData,
);
});
});
@@ -123,9 +118,13 @@ describe.only('DutchAuctionWrapper', () => {
// get auction details
const auctionDetails = await contractWrappers.dutchAuction.getAuctionDetailsAsync(sellOrder);
// run some basic sanity checks on the return value
- expect(auctionDetails.beginTimeSeconds, 'auctionDetails.beginTimeSeconds').to.be.bignumber.equal(auctionBeginTimeSeconds);
+ expect(auctionDetails.beginTimeSeconds, 'auctionDetails.beginTimeSeconds').to.be.bignumber.equal(
+ auctionBeginTimeSeconds,
+ );
expect(auctionDetails.beginAmount, 'auctionDetails.beginAmount').to.be.bignumber.equal(auctionBeginAmount);
- expect(auctionDetails.endTimeSeconds, 'auctionDetails.endTimeSeconds').to.be.bignumber.equal(auctionEndTimeSeconds);
+ expect(auctionDetails.endTimeSeconds, 'auctionDetails.endTimeSeconds').to.be.bignumber.equal(
+ auctionEndTimeSeconds,
+ );
});
});
});