import padTrimValue from '../padTrimValue'; test('should return original value if no decimalScale', () => { expect(padTrimValue('1000000')).toEqual('1000000'); }); test('should padd decimals when decimal present', () => { expect(padTrimValue('1000000.')).toEqual('1000000.00'); }); test('should pad decimals when a single decimal is given', () => { expect(padTrimValue('1000000.1')).toEqual('1000000.10'); }); test('should not pad decimals when a two decimal is given', () => { expect(padTrimValue('1000000.11')).toEqual('1000000.11'); }); test('should return blank value if no value', () => { expect(padTrimValue('', '.')).toEqual(''); });