|
|
@@ -34,6 +34,10 @@ describe('getCurrencySymbol', () => {
|
|
|
expect(getCurrencySymbol('BZD')).toBe('BZ$');
|
|
|
});
|
|
|
|
|
|
+ it('returns ₱ for PHP', () => {
|
|
|
+ expect(getCurrencySymbol('PHP')).toBe('₱');
|
|
|
+ });
|
|
|
+
|
|
|
it('returns the code itself for unknown currencies', () => {
|
|
|
expect(getCurrencySymbol('XYZ')).toBe('XYZ');
|
|
|
});
|
|
|
@@ -61,7 +65,11 @@ describe('SUPPORTED_CURRENCIES', () => {
|
|
|
expect(SUPPORTED_CURRENCIES.find((c) => c.code === 'IDR')).toBeDefined();
|
|
|
});
|
|
|
|
|
|
- it('has 31 entries', () => {
|
|
|
- expect(SUPPORTED_CURRENCIES).toHaveLength(31);
|
|
|
+ it('contains PHP', () => {
|
|
|
+ expect(SUPPORTED_CURRENCIES.find((c) => c.code === 'PHP')).toEqual({ code: 'PHP', label: 'PHP (₱)' });
|
|
|
+ });
|
|
|
+
|
|
|
+ it('has 32 entries', () => {
|
|
|
+ expect(SUPPORTED_CURRENCIES).toHaveLength(32);
|
|
|
});
|
|
|
});
|