Generate a unit test
Before
Write tests for this function.
After
In src/discounts/calculateDiscount.test.ts, use Vitest. Match the table-driven style in adjacent pricing tests. Cover zero, tier boundaries, cap, and unknown customer type. Use exact currency values and do not mock pure helpers. Do not edit production code without a confirmed defect.
