Input
formatAmount(1234, 'USD')
Output
'$12.34'
1234 cents → 12.34 dollars.
You're writing tests for a Stripe-style amount formatter. The function is in `src/formatters.ts` — it's read-only. You can read it, but you can't change it. Your job is in `tests/formatters.test.ts`. Write a test suite...
src/formatters.tsReference startertests/formatters.test.tsEditable testsformatAmount(1234, 'USD')
'$12.34'
1234 cents → 12.34 dollars.
formatAmount(-50, 'USD')
'-$0.50'
Minus sign goes before the currency symbol.
Real production codebases use property-based testing (fast-check, hypothesis) for functions like this — generate random inputs and check invariants instead of hand-picking cases. How would you express 'the output always starts with the right currency symbol' as a property?