aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils/test
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-08-18 04:00:54 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-08-23 06:39:03 +0800
commite8a1950a7489e83f7f1a1127ee325f0c5c36483c (patch)
treeffecf66fce01ccb0fb2ddcce67183d06dce2e245 /packages/order-utils/test
parent3c973ba9f64197fcc1a66f319e3d1aa33d96b6d7 (diff)
downloaddexon-sol-tools-e8a1950a7489e83f7f1a1127ee325f0c5c36483c.tar
dexon-sol-tools-e8a1950a7489e83f7f1a1127ee325f0c5c36483c.tar.gz
dexon-sol-tools-e8a1950a7489e83f7f1a1127ee325f0c5c36483c.tar.bz2
dexon-sol-tools-e8a1950a7489e83f7f1a1127ee325f0c5c36483c.tar.lz
dexon-sol-tools-e8a1950a7489e83f7f1a1127ee325f0c5c36483c.tar.xz
dexon-sol-tools-e8a1950a7489e83f7f1a1127ee325f0c5c36483c.tar.zst
dexon-sol-tools-e8a1950a7489e83f7f1a1127ee325f0c5c36483c.zip
Add ForwarderHelperImplConfig
Diffstat (limited to 'packages/order-utils/test')
-rw-r--r--packages/order-utils/test/market_utils_test.ts24
1 files changed, 12 insertions, 12 deletions
diff --git a/packages/order-utils/test/market_utils_test.ts b/packages/order-utils/test/market_utils_test.ts
index 109420a02..0c0151e57 100644
--- a/packages/order-utils/test/market_utils_test.ts
+++ b/packages/order-utils/test/market_utils_test.ts
@@ -139,11 +139,11 @@ describe('marketUtils', () => {
);
describe('no target orders', () => {
it('returns empty and zero remainingFeeAmount', async () => {
- const { resultOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders(
+ const { resultFeeOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders(
[],
inputFeeOrders,
);
- expect(resultOrders).to.be.empty;
+ expect(resultFeeOrders).to.be.empty;
expect(remainingFeeAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT);
});
});
@@ -162,14 +162,14 @@ describe('marketUtils', () => {
// generate remainingFillableMakerAssetAmounts that equal the makerAssetAmount
const remainingFillableMakerAssetAmounts = [makerAssetAmount, makerAssetAmount, makerAssetAmount];
it('returns empty and non-zero remainingFeeAmount', async () => {
- const { resultOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders(
+ const { resultFeeOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders(
inputOrders,
[],
{
remainingFillableMakerAssetAmounts,
},
);
- expect(resultOrders).to.be.empty;
+ expect(resultFeeOrders).to.be.empty;
expect(remainingFeeAmount).to.be.bignumber.equal(new BigNumber(30));
});
});
@@ -183,11 +183,11 @@ describe('marketUtils', () => {
3,
);
it('returns empty and zero remainingFeeAmount', async () => {
- const { resultOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders(
+ const { resultFeeOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders(
inputOrders,
inputFeeOrders,
);
- expect(resultOrders).to.be.empty;
+ expect(resultFeeOrders).to.be.empty;
expect(remainingFeeAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT);
});
});
@@ -204,11 +204,11 @@ describe('marketUtils', () => {
3,
);
it('returns input fee orders and zero remainingFeeAmount', async () => {
- const { resultOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders(
+ const { resultFeeOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders(
inputOrders,
inputFeeOrders,
);
- expect(resultOrders).to.be.deep.equal(inputFeeOrders);
+ expect(resultFeeOrders).to.be.deep.equal(inputFeeOrders);
expect(remainingFeeAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT);
});
});
@@ -230,14 +230,14 @@ describe('marketUtils', () => {
// 3. order is completely fillable
const remainingFillableMakerAssetAmounts = [constants.ZERO_AMOUNT, new BigNumber(5), makerAssetAmount];
it('returns first two input fee orders and zero remainingFeeAmount', async () => {
- const { resultOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders(
+ const { resultFeeOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders(
inputOrders,
inputFeeOrders,
{
remainingFillableMakerAssetAmounts,
},
);
- expect(resultOrders).to.be.deep.equal([inputFeeOrders[0], inputFeeOrders[1]]);
+ expect(resultFeeOrders).to.be.deep.equal([inputFeeOrders[0], inputFeeOrders[1]]);
expect(remainingFeeAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT);
});
});
@@ -254,11 +254,11 @@ describe('marketUtils', () => {
3,
);
it('returns input fee orders and non-zero remainingFeeAmount', async () => {
- const { resultOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders(
+ const { resultFeeOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders(
inputOrders,
inputFeeOrders,
);
- expect(resultOrders).to.be.deep.equal(inputFeeOrders);
+ expect(resultFeeOrders).to.be.deep.equal(inputFeeOrders);
expect(remainingFeeAmount).to.be.bignumber.equal(new BigNumber(30));
});
});