mirror of https://github.com/ghostfolio/ghostfolio
2 changed files with 16 additions and 1 deletions
@ -0,0 +1,13 @@ |
|||
import { extractNumberFromString } from '@ghostfolio/common/helper'; |
|||
|
|||
describe('Helper', () => { |
|||
describe('Extract number from string', () => { |
|||
it('Get decimal number', async () => { |
|||
expect(extractNumberFromString('999.99')).toEqual(999.99); |
|||
}); |
|||
|
|||
it('Get decimal number with group', async () => { |
|||
expect(extractNumberFromString('99.999,99')).toEqual(99999.99); |
|||
}); |
|||
}); |
|||
}); |
Loading…
Reference in new issue