@lion/localize
Version:
The localization system helps to manage localization data split into locales and automate its loading
17 lines (13 loc) • 613 B
JavaScript
import { expect } from '@open-wc/testing';
import { getDecimalSeparator } from '../../src/number/getDecimalSeparator.js';
describe('getDecimalSeparator', () => {
it('returns decimal separator for locale', () => {
expect(getDecimalSeparator('en-GB')).to.equal('.');
expect(getDecimalSeparator('nl-NL')).to.equal(',');
expect(getDecimalSeparator('fr-FR')).to.equal(',');
});
it('will return the decimalSeparator from options if passed', () => {
expect(getDecimalSeparator('nl-NL')).to.equal(',');
expect(getDecimalSeparator('nl-NL', { decimalSeparator: '.' })).to.equal('.');
});
});