cldr
Version:
Library for extracting data from CLDR (the Unicode Common Locale Data Repository)
29 lines (26 loc) • 758 B
JavaScript
const expect = require('unexpected');
const cldr = require('../lib/cldr');
describe('extractLanguageSupplementalData', () => {
it('should return an object with locale ids as keys and objects as values', () => {
expect(cldr.extractLanguageSupplementalData(), 'to satisfy', {
en: {},
fr: {},
});
});
it('should return a list of scripts for English', () => {
expect(cldr.extractLanguageSupplementalData(), 'to satisfy', {
en: {
scripts: ['Latn'],
},
});
});
it('should return a list of secondary scripts for English', () => {
expect(cldr.extractLanguageSupplementalData(), 'to satisfy', {
en: {
secondary: {
scripts: ['Dsrt', 'Shaw'],
},
},
});
});
});