mirror of
https://github.com/zoo-labs/zoo.git
synced 2026-11-10 22:32:34 +00:00
12 lines
535 B
TypeScript
12 lines
535 B
TypeScript
import { JSBI, Percent } from '@zoolabs/zdk'
|
|
|
|
import { basisPointsToPercent } from './basisPointsToPercent'
|
|
|
|
describe('#basisPointsToPercent', () => {
|
|
it('converts basis points numbers to percents', () => {
|
|
expect(basisPointsToPercent(100).equalTo(new Percent(JSBI.BigInt(1), JSBI.BigInt(100)))).toBeTruthy()
|
|
expect(basisPointsToPercent(500).equalTo(new Percent(JSBI.BigInt(5), JSBI.BigInt(100)))).toBeTruthy()
|
|
expect(basisPointsToPercent(50).equalTo(new Percent(JSBI.BigInt(5), JSBI.BigInt(1000)))).toBeTruthy()
|
|
})
|
|
})
|