diff --git a/frontend/src/__tests__/plans-range-validation.test.ts b/frontend/src/__tests__/plans-range-validation.test.ts index 6e1bb0b6f..2eb66f9de 100644 --- a/frontend/src/__tests__/plans-range-validation.test.ts +++ b/frontend/src/__tests__/plans-range-validation.test.ts @@ -76,6 +76,15 @@ jest.mock('../utils', () => ({ formatRampSchedule: jest.fn((v) => v ?? ''), getStatusBadge: jest.fn(() => ({ class: 'active', label: 'Active' })), escapeHtml: jest.fn((s) => s ?? ''), + escapeHtmlAttr: jest.fn((str: string | null | undefined) => { + if (str == null) return ''; + return str + .replace(/&/g, '&') + .replace(//g, '>') + .replace(/"/g, '"') + .replace(/'/g, '''); + }), formatCurrency: jest.fn((v) => `$${v}`), populateAccountFilter: jest.fn(() => Promise.resolve()), }));