Browse Source

Added test case for extractNumberFromString with locale where it previously failed

pull/4243/head
Guillermo Fernandez 7 months ago
parent
commit
54eb91e72a
  1. 6
      libs/common/src/lib/helper.spec.ts

6
libs/common/src/lib/helper.spec.ts

@ -17,6 +17,12 @@ describe('Helper', () => {
expect(extractNumberFromString({ value: '999.99 CHF' })).toEqual(999.99);
});
it('Get decimal number (comma notation) for locale where currency is not grouped by default', () => {
expect(
extractNumberFromString({ locale: 'es-ES', value: '999,99' })
).toEqual(999.99);
});
it('Get decimal number (comma notation)', () => {
expect(
extractNumberFromString({ locale: 'de-DE', value: '999,99' })

Loading…
Cancel
Save