kendo-intl/test/cldr-default-data.js

31 строка
986 B
JavaScript
Исходник Обычный вид История

import { currencyDisplay, currencyDisplays, territoryCurrencyCode } from '../src/cldr';
import { errors } from '../src/errors';
describe('currencyDisplay', () => {
it('should throw an exception when locale is not available', () => {
expect(() => {
currencyDisplay('de', {
currency: 'USD'
});
2016-09-17 12:51:36 +03:00
}).toThrowError(new RegExp(errors.NoLocale.name));
});
});
describe('currencyDisplays', () => {
it('should throw an exception when currency display is not available', () => {
expect(() => {
currencyDisplays('en', {
currency: 'GBP'
});
2016-09-17 12:51:36 +03:00
}).toThrowError(new RegExp(errors.NoCurrencyDisplay.name));
});
});
describe('territoryCurrencyCode', () => {
it('should throw an exception when no region currencies info', () => {
expect(() => {
territoryCurrencyCode('en');
2016-09-17 12:51:36 +03:00
}).toThrowError(new RegExp(errors.NoCurrencyRegion.name));
});
});