Files
BeWoPlaner/BeWoPlanerMobil/node_modules/cldr/test/extractNumberingSystem.js
Lyndon Jetten 88fd24f3a9 MoK:
- Bug beim Übernehmen eines Termins in die Zeiterfassung, wenn man Stunden als Zeiteinheit ausgewählt hatte, behoben.
- Berichte und Mitarbeiterstundenkonto eingebaut
- Node-Module optimiert (sehr viele gelöscht)
2023-05-15 11:54:13 +02:00

51 lines
1.5 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const expect = require('unexpected');
const cldr = require('../lib/cldr');
describe('extractNumberingSystem', () => {
it('should throw if the numbering system does not exist', () => {
expect(
() => cldr.extractNumberingSystem('foo'),
'to error',
'Unknown numbering system: foo'
);
});
it('should extract a numeric (digits-based) numbering system', () => {
expect(cldr.extractNumberingSystem('fullwide'), 'to equal', {
type: 'numeric',
digits: ['', '', '', '', '', '', '', '', '', ''],
});
});
it('should extract digits with high codepoints', () => {
expect(cldr.extractNumberingSystem('ahom'), 'to equal', {
type: 'numeric',
digits: ['𑜰', '𑜱', '𑜲', '𑜳', '𑜴', '𑜵', '𑜶', '𑜷', '𑜸', '𑜹'],
});
});
it('should extract an algorithmic numbering system without a locale', () => {
expect(cldr.extractNumberingSystem('ethi'), 'to equal', {
type: 'algorithmic',
rules: 'renderEthiopic',
});
});
it('should extract an algorithmic numbering system with a locale', () => {
expect(cldr.extractNumberingSystem('jpan'), 'to equal', {
type: 'algorithmic',
rules: 'renderSpelloutCardinal',
locale: 'ja',
});
});
it('should extract an algorithmic numbering system with a locale and a sublocale', () => {
expect(cldr.extractNumberingSystem('hantfin'), 'to equal', {
type: 'algorithmic',
rules: 'renderSpelloutCardinalFinancial',
locale: 'zh_Hant',
});
});
});