aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils/test
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-08-10 06:54:17 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-08-10 07:12:42 +0800
commitcbe639866ec9d6088cc7aa133033d2735524c5a0 (patch)
tree31dcd5fb2a73d4d6ce33f0c4d495625d53ef7e58 /packages/order-utils/test
parentfcd57d2743e4b6a1363b8071696147a91d2afb00 (diff)
downloaddexon-sol-tools-cbe639866ec9d6088cc7aa133033d2735524c5a0.tar
dexon-sol-tools-cbe639866ec9d6088cc7aa133033d2735524c5a0.tar.gz
dexon-sol-tools-cbe639866ec9d6088cc7aa133033d2735524c5a0.tar.bz2
dexon-sol-tools-cbe639866ec9d6088cc7aa133033d2735524c5a0.tar.lz
dexon-sol-tools-cbe639866ec9d6088cc7aa133033d2735524c5a0.tar.xz
dexon-sol-tools-cbe639866ec9d6088cc7aa133033d2735524c5a0.tar.zst
dexon-sol-tools-cbe639866ec9d6088cc7aa133033d2735524c5a0.zip
Make feeRate optional with a default of 0
Diffstat (limited to 'packages/order-utils/test')
-rw-r--r--packages/order-utils/test/rate_utils_test.ts8
1 files changed, 1 insertions, 7 deletions
diff --git a/packages/order-utils/test/rate_utils_test.ts b/packages/order-utils/test/rate_utils_test.ts
index 2f321a7db..167a40465 100644
--- a/packages/order-utils/test/rate_utils_test.ts
+++ b/packages/order-utils/test/rate_utils_test.ts
@@ -17,16 +17,10 @@ describe('rateUtils', () => {
takerFee: new BigNumber(20),
});
describe('#getFeeAdjustedRateOfOrder', () => {
- it('throws when feeRate is zero', async () => {
- const feeRate = constants.ZERO_AMOUNT;
- expect(() => rateUtils.getFeeAdjustedRateOfOrder(testOrder, feeRate)).to.throw(
- 'Expected feeRate: 0 to be greater than 0',
- );
- });
it('throws when feeRate is less than zero', async () => {
const feeRate = new BigNumber(-1);
expect(() => rateUtils.getFeeAdjustedRateOfOrder(testOrder, feeRate)).to.throw(
- 'Expected feeRate: -1 to be greater than 0',
+ 'Expected feeRate: -1 to be greater than or equal to 0',
);
});
it('correctly calculates fee adjusted rate', async () => {