You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
it('should filter exponentially small numbers on non dot decimal separator languages',function(){$locale.NUMBER_FORMATS.DECIMAL_SEP=',';expect(number(1e-50,0)).toEqual('0');expect(number(1e-6,6)).toEqual('0,000001');expect(number(1e-7,6)).toEqual('0,000000');expect(number(-1e-50,0)).toEqual('0');expect(number(-1e-6,6)).toEqual('-0,000001');expect(number(-1e-7,6)).toEqual('-0,000000');});
The .toFixed method is directly use to render the final number. And so, does NOT care about i18n at all.
To solve this issue, I suggest just to replace the dot by the expected decimal separator. As we deal this just number < 1, we don't have to manage thousand group separators.