mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 03:01:21 +02:00
extend currencies with Ukrainian Hryvnia (#801)
extend currencies with Ukrainian Hryvnia (#801)
This commit is contained in:
@@ -26,6 +26,10 @@ describe('getCurrencySymbol', () => {
|
||||
expect(getCurrencySymbol('MYR')).toBe('RM');
|
||||
});
|
||||
|
||||
it('returns ₴ for UAH', () => {
|
||||
expect(getCurrencySymbol('UAH')).toBe('₴');
|
||||
});
|
||||
|
||||
it('returns the code itself for unknown currencies', () => {
|
||||
expect(getCurrencySymbol('XYZ')).toBe('XYZ');
|
||||
});
|
||||
@@ -45,7 +49,7 @@ describe('SUPPORTED_CURRENCIES', () => {
|
||||
expect(SUPPORTED_CURRENCIES.find((c) => c.code === 'MYR')).toBeDefined();
|
||||
});
|
||||
|
||||
it('has 28 entries', () => {
|
||||
expect(SUPPORTED_CURRENCIES).toHaveLength(28);
|
||||
it('has 29 entries', () => {
|
||||
expect(SUPPORTED_CURRENCIES).toHaveLength(29);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -27,6 +27,7 @@ const CURRENCY_SYMBOLS: Record<string, string> = {
|
||||
RUB: '₽',
|
||||
HUF: 'Ft',
|
||||
ILS: '₪',
|
||||
UAH: '₴',
|
||||
};
|
||||
|
||||
export function getCurrencySymbol(currencyCode: string): string {
|
||||
|
||||
Reference in New Issue
Block a user