Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
alekseevaiana committed Jul 2, 2024
1 parent c657651 commit b430fb7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,22 +171,22 @@ describe('utils', () => {

describe('formatDataNumber', () => {
it('handles format decimals correctly', () => {
const input = "2457565485783295579314012"
const input = '2457565485783295579314012'
expect(formatDataNumber(input, 18, 2)).toEqual('2,457,565.49')
})

it('handles dollar currency sign correctly', () => {
const input = "2457565485783295579314012"
const input = '2457565485783295579314012'
expect(formatDataNumber(input, 18, 2, true)).toEqual('$2,457,565.49')
})

it('handles compact value and currency sign correctly', () => {
const input = "2457565485783295579314012"
const input = '2457565485783295579314012'
expect(formatDataNumber(input, 18, 2, true, true)).toEqual('$2.46M')
})

it('handles compact format decimals and minimum decimals correctly', () => {
const input = "1000000000000000000"
const input = '1000000000000000000'
expect(formatDataNumber(input, 18, 3, true, undefined, 4)).toEqual('$1.0000')
})
})
Expand Down

0 comments on commit b430fb7

Please sign in to comment.