@lion/localize
Version:
The localization system helps to manage localization data split into locales and automate its loading
15 lines (12 loc) • 666 B
JavaScript
import { expect } from '@open-wc/testing';
import { localizeTearDown } from '../../test-helpers/localizeTearDown.js';
import { getCurrencyName } from '../../src/number/getCurrencyName.js';
describe('getCurrencyName', () => {
afterEach(localizeTearDown);
it('returns the right name for currency and locale combination', async () => {
expect(getCurrencyName('USD', { locale: 'en-GB' })).to.equal('US dollars');
expect(getCurrencyName('USD', { locale: 'nl-NL' })).to.equal('Amerikaanse dollar');
expect(getCurrencyName('EUR', { locale: 'en-GB' })).to.equal('euros');
expect(getCurrencyName('EUR', { locale: 'nl-NL' })).to.equal('euro');
});
});