Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('delegates to IntlRelativeFormat', () => {
emptyLocaleData();
expect(registry.hasLocaleData('en')).toBe(false);
IntlRelativeFormat.__addLocaleData(IRF_LOCALE_DATA.en);
expect(registry.hasLocaleData('en')).toBe(true);
});
export function addLocaleData(data = []) {
let locales = Array.isArray(data) ? data : [data];
IntlRelativeFormat.__addLocaleData(...locales.filter(l => !!l.locale));
}
export default function(data) {
IntlMessageFormat.__addLocaleData(data);
IntlRelativeFormat.__addLocaleData(data);
}