All files / molecules/Account utils.ts

80% Statements 4/5
50% Branches 1/2
100% Functions 1/1
100% Lines 4/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 63x 100x 100x 100x    
export const formatCurrency = (amount: number | undefined): string => {
  Iif (!amount) return '0,00 €';
  const formatted = parseFloat(amount?.toString()).toFixed(2);
  return formatted.replace(/\./g, ',') + ' €';
};