← All changes
|
backend/views/components/Analytics/__tests__/utils/utils.test.js
+6
-6
1.4.7
→
1.4.19
View file →
| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | import { |
| 2 | 2 | cn, |
| 3 | 3 | fmt, |
| 4 | - fmtDate, | |
| 4 | + formatDate, | |
| 5 | 5 | formatTooltipDate, |
| 6 | 6 | formatXAxisDate, |
| 7 | 7 | } from '../../lib/utils'; |
| 8 | 8 | |
| @@ -52,18 +52,18 @@ | ||
| 52 | 52 | expect(fmt('250.5')).toBe('$250.50'); |
| 53 | 53 | }); |
| 54 | 54 | }); |
| 55 | 55 | |
| 56 | - describe('fmtDate', () => { | |
| 56 | + describe('formatDate', () => { | |
| 57 | 57 | it('formats a date string to locale format', () => { |
| 58 | - const result = fmtDate('2025-05-15'); | |
| 58 | + const result = formatDate('2025-05-15'); | |
| 59 | 59 | expect(result).toMatch(/May\s+15,\s+2025/); |
| 60 | 60 | }); |
| 61 | 61 | |
| 62 | 62 | it('returns dash for null/undefined', () => { |
| 63 | - expect(fmtDate(null)).toBe('—'); | |
| 64 | - expect(fmtDate(undefined)).toBe('—'); | |
| 65 | - expect(fmtDate('')).toBe('—'); | |
| 63 | + expect(formatDate(null)).toBe('—'); | |
| 64 | + expect(formatDate(undefined)).toBe('—'); | |
| 65 | + expect(formatDate('')).toBe('—'); | |
| 66 | 66 | }); |
| 67 | 67 | }); |
| 68 | 68 | |
| 69 | 69 | describe('formatTooltipDate', () => { |