Commit e3fec21
committed
test(billing): add comprehensive unit tests for auto-topup-helpers
- Add 17 tests for isValidPaymentMethod (card expiration, link, unsupported types)
- Add 8 tests for filterValidPaymentMethods (empty, valid, invalid, mixed)
- Add 11 tests for findValidPaymentMethod (first valid, order preservation)
- Add 6 tests for fetchPaymentMethods (Stripe API mocking)
- Add 9 tests for createPaymentIntent (params, idempotency, metadata)
- Add 10 tests for getOrSetDefaultPaymentMethod (default reuse, setting new)
- Total: 61 comprehensive tests with Stripe API mocking1 parent 2b720c9 commit e3fec21
1 file changed
+1215
-0
lines changed
0 commit comments