Commit 7ca79ff1 authored by Moody Salem's avatar Moody Salem

fix unit tests

parent 4903258b
...@@ -10,19 +10,16 @@ describe('prices', () => { ...@@ -10,19 +10,16 @@ describe('prices', () => {
const pair12 = new Pair(new TokenAmount(token1, JSBI.BigInt(10000)), new TokenAmount(token2, JSBI.BigInt(20000))) const pair12 = new Pair(new TokenAmount(token1, JSBI.BigInt(10000)), new TokenAmount(token2, JSBI.BigInt(20000)))
const pair23 = new Pair(new TokenAmount(token2, JSBI.BigInt(20000)), new TokenAmount(token3, JSBI.BigInt(30000))) const pair23 = new Pair(new TokenAmount(token2, JSBI.BigInt(20000)), new TokenAmount(token3, JSBI.BigInt(30000)))
describe('#computeTradePriceBreakdown', () => { describe('#computeRealizedLPFeeAmount', () => {
it('returns undefined for undefined', () => { it('returns undefined for undefined', () => {
expect(computeRealizedLPFeeAmount(undefined)).toEqual({ expect(computeRealizedLPFeeAmount(undefined)).toEqual(undefined)
priceImpactWithoutFee: undefined,
realizedLPFee: undefined,
})
}) })
it('correct realized lp fee for single hop', () => { it('correct realized lp fee for single hop', () => {
expect( expect(
computeRealizedLPFeeAmount( computeRealizedLPFeeAmount(
new Trade(new Route([pair12], token1), new TokenAmount(token1, JSBI.BigInt(1000)), TradeType.EXACT_INPUT) new Trade(new Route([pair12], token1), new TokenAmount(token1, JSBI.BigInt(1000)), TradeType.EXACT_INPUT)
).realizedLPFee )
).toEqual(new TokenAmount(token1, JSBI.BigInt(3))) ).toEqual(new TokenAmount(token1, JSBI.BigInt(3)))
}) })
...@@ -34,7 +31,7 @@ describe('prices', () => { ...@@ -34,7 +31,7 @@ describe('prices', () => {
new TokenAmount(token1, JSBI.BigInt(1000)), new TokenAmount(token1, JSBI.BigInt(1000)),
TradeType.EXACT_INPUT TradeType.EXACT_INPUT
) )
).realizedLPFee )
).toEqual(new TokenAmount(token1, JSBI.BigInt(5))) ).toEqual(new TokenAmount(token1, JSBI.BigInt(5)))
}) })
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment