Skip to content

Commit e3fec21

Browse files
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 mocking
1 parent 2b720c9 commit e3fec21

File tree

1 file changed

+1215
-0
lines changed

1 file changed

+1215
-0
lines changed

0 commit comments

Comments
 (0)