Skip to content

Commit

Permalink
Add test case for empty string amount
Browse files Browse the repository at this point in the history
  • Loading branch information
csillag committed Sep 28, 2022
1 parent 74642f1 commit 80574ae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/lib/helpers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import {
} from './helpers'

describe('parseRoseStringToBaseUnitString', () => {
it('should not choke on an empty string', () => {
expect(parseRoseStringToBaseUnitString('')).toEqual('0')
})
it('should parse stringified number of ROSEs to stringified base units', () => {
expect(parseRoseStringToBaseUnitString('9143.65')).toEqual('9143650000000')
expect(parseRoseStringToBaseUnitString('5')).toEqual('5000000000')
Expand Down

0 comments on commit 80574ae

Please sign in to comment.