diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-08-10 09:18:13 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-08-14 12:31:22 +0800 |
commit | 66745c5260d2e2802211697980ce91a0cf084e83 (patch) | |
tree | 699210868426738069ae662449eb05e16c7b0aac /packages | |
parent | c10c4cec1db2c5bc0b71177aea7590ee6fda8735 (diff) | |
download | dexon-sol-tools-66745c5260d2e2802211697980ce91a0cf084e83.tar dexon-sol-tools-66745c5260d2e2802211697980ce91a0cf084e83.tar.gz dexon-sol-tools-66745c5260d2e2802211697980ce91a0cf084e83.tar.bz2 dexon-sol-tools-66745c5260d2e2802211697980ce91a0cf084e83.tar.lz dexon-sol-tools-66745c5260d2e2802211697980ce91a0cf084e83.tar.xz dexon-sol-tools-66745c5260d2e2802211697980ce91a0cf084e83.tar.zst dexon-sol-tools-66745c5260d2e2802211697980ce91a0cf084e83.zip |
Remove remaining amounts that are now defaults in tests
Diffstat (limited to 'packages')
-rw-r--r-- | packages/order-utils/test/market_utils_test.ts | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/packages/order-utils/test/market_utils_test.ts b/packages/order-utils/test/market_utils_test.ts index 2f6bb7bd1..109420a02 100644 --- a/packages/order-utils/test/market_utils_test.ts +++ b/packages/order-utils/test/market_utils_test.ts @@ -11,7 +11,7 @@ chaiSetup.configure(); const expect = chai.expect; // tslint:disable: no-unused-expression -describe.only('marketUtils', () => { +describe('marketUtils', () => { describe('#findOrdersThatCoverMakerAssetFillAmount', () => { describe('no orders', () => { it('returns empty and unchanged remainingFillAmount', async () => { @@ -33,8 +33,6 @@ describe.only('marketUtils', () => { }, 3, ); - // generate remainingFillableMakerAssetAmounts that equal the makerAssetAmount - const remainingFillableMakerAssetAmounts = [makerAssetAmount, makerAssetAmount, makerAssetAmount]; it('returns input orders and zero remainingFillAmount when input exactly matches requested fill amount', async () => { // try to fill 20 units of makerAsset // include 10 units of slippageBufferAmount @@ -44,7 +42,6 @@ describe.only('marketUtils', () => { inputOrders, fillAmount, { - remainingFillableMakerAssetAmounts, slippageBufferAmount, }, ); @@ -60,7 +57,6 @@ describe.only('marketUtils', () => { inputOrders, fillAmount, { - remainingFillableMakerAssetAmounts, slippageBufferAmount, }, ); @@ -76,7 +72,6 @@ describe.only('marketUtils', () => { inputOrders, fillAmount, { - remainingFillableMakerAssetAmounts, slippageBufferAmount, }, ); @@ -89,9 +84,6 @@ describe.only('marketUtils', () => { const { resultOrders, remainingFillAmount } = marketUtils.findOrdersThatCoverMakerAssetFillAmount( inputOrders, fillAmount, - { - remainingFillableMakerAssetAmounts, - }, ); expect(resultOrders).to.be.deep.equal([inputOrders[0]]); expect(remainingFillAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT); @@ -102,9 +94,6 @@ describe.only('marketUtils', () => { const { resultOrders, remainingFillAmount } = marketUtils.findOrdersThatCoverMakerAssetFillAmount( inputOrders, fillAmount, - { - remainingFillableMakerAssetAmounts, - }, ); expect(resultOrders).to.be.deep.equal([inputOrders[0], inputOrders[1]]); expect(remainingFillAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT); @@ -148,16 +137,11 @@ describe.only('marketUtils', () => { }, 3, ); - // generate remainingFillableFeeAmounts that equal the zrxAmount - const remainingFillableFeeAmounts = [zrxAmount, zrxAmount, zrxAmount]; describe('no target orders', () => { it('returns empty and zero remainingFeeAmount', async () => { const { resultOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders( [], inputFeeOrders, - { - remainingFillableFeeAmounts, - }, ); expect(resultOrders).to.be.empty; expect(remainingFeeAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT); @@ -198,16 +182,10 @@ describe.only('marketUtils', () => { }, 3, ); - // generate remainingFillableMakerAssetAmounts that equal the makerAssetAmount - const remainingFillableMakerAssetAmounts = [makerAssetAmount, makerAssetAmount, makerAssetAmount]; it('returns empty and zero remainingFeeAmount', async () => { const { resultOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders( inputOrders, inputFeeOrders, - { - remainingFillableMakerAssetAmounts, - remainingFillableFeeAmounts, - }, ); expect(resultOrders).to.be.empty; expect(remainingFeeAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT); @@ -225,16 +203,10 @@ describe.only('marketUtils', () => { }, 3, ); - // generate remainingFillableMakerAssetAmounts that equal the makerAssetAmount - const remainingFillableMakerAssetAmounts = [makerAssetAmount, makerAssetAmount, makerAssetAmount]; it('returns input fee orders and zero remainingFeeAmount', async () => { const { resultOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders( inputOrders, inputFeeOrders, - { - remainingFillableMakerAssetAmounts, - remainingFillableFeeAmounts, - }, ); expect(resultOrders).to.be.deep.equal(inputFeeOrders); expect(remainingFeeAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT); @@ -263,7 +235,6 @@ describe.only('marketUtils', () => { inputFeeOrders, { remainingFillableMakerAssetAmounts, - remainingFillableFeeAmounts, }, ); expect(resultOrders).to.be.deep.equal([inputFeeOrders[0], inputFeeOrders[1]]); @@ -282,16 +253,10 @@ describe.only('marketUtils', () => { }, 3, ); - // generate remainingFillableMakerAssetAmounts that equal the makerAssetAmount - const remainingFillableMakerAssetAmounts = [makerAssetAmount, makerAssetAmount, makerAssetAmount]; it('returns input fee orders and non-zero remainingFeeAmount', async () => { const { resultOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders( inputOrders, inputFeeOrders, - { - remainingFillableMakerAssetAmounts, - remainingFillableFeeAmounts, - }, ); expect(resultOrders).to.be.deep.equal(inputFeeOrders); expect(remainingFeeAmount).to.be.bignumber.equal(new BigNumber(30)); |