add a test for calculating slippage amounts

This commit is contained in:
Moody Salem 2021-05-09 12:31:45 -05:00
parent 452f2dc3c0
commit 4d3f870b93
No known key found for this signature in database
GPG Key ID: 8CB5CD10385138DB

@ -34,6 +34,10 @@ describe('utils', () => {
'100',
'100',
])
expect(calculateSlippageAmount(tokenAmount, new Percent(5, 100)).map((bound) => bound.toString())).toEqual([
'95',
'105',
])
expect(calculateSlippageAmount(tokenAmount, new Percent(100, 10_000)).map((bound) => bound.toString())).toEqual([
'99',
'101',