Files
Tiber365/node_modules/locale-emoji/test.js
becarta 3168826fa8 Add internationalization support with astro-i18next integration
- Implemented astro-i18next for multi-language support, including English, Dutch, and Italian.
- Configured default locale and language fallback settings.
- Defined routes for localized content in the configuration.
- Updated package.json and package-lock.json to include new dependencies for i18next and related plugins.
2025-05-23 15:10:00 +02:00

33 lines
723 B
JavaScript

var localeEmoji = require('.');
describe('localeEmoji', function() {
var tests = {
'de': '🇩🇪',
'de-DE': '🇩🇪',
'de_DE': '🇩🇪',
'de-CH': '🇨🇭',
'en': '🇺🇸',
'EN': '🇺🇸',
'en-GB': '🇬🇧',
'en-US': '🇺🇸',
'EN-US': '🇺🇸',
'EN-us': '🇺🇸',
'en-us': '🇺🇸',
'pt': '🇧🇷',
'sk_Latin_SK': '🇸🇰',
'eo': '',
};
Object.keys(tests).forEach(function(from) {
var to = tests[from];
it(from + ' -> ' + to, function() {
expect(localeEmoji(from)).toEqual(to);
});
});
it('should return a empty string for invalid input', function() {
expect(localeEmoji('potato')).toEqual('');
});
});