PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.4.21
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.4.21
1.4.21 1.4.20 1.4.19 1.4.18 1.4.17 1.4.16 1.4.15 1.4.14 1.4.13 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.3.54 1.3.53 1.3.52 All 184 releases
← All changes | backend/views/components/Analytics/__tests__/utils/utils.test.js +6 -6 1.4.7 → 1.4.21 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', () => {