Commit 8a789ec
committed
test: add comprehensive integration tests for billing DI patterns
- Add monthly reset flow tests (future date skip, user not found error)
- Add usage data flow tests (reset -> auto-topup -> balance calculation)
- Add debt settlement flow tests (single/multiple debts, debt exceeds grant)
- Add credit delegation flow tests (no repo, empty repo, malformed URLs)
- Add credit fallback flow tests (no repo fallback, org delegation attempt)
- Add complete billing cycle tests (reset -> grant -> consume -> balance)
- Add balance calculation tests (multi-grant types, debt, personal context)
- Add error handling tests (user not found, DB errors, auto-topup graceful fail)
94 billing tests now pass with full DI coverage.1 parent 2d675f7 commit 8a789ec
File tree
1 file changed
+1030
-0
lines changed- packages/billing/src/__tests__
1 file changed
+1030
-0
lines changed
0 commit comments