chore: add BillingService.ts test coverage #1505

Closed
opened 2026-04-05 16:27:50 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @fedealconada on 11/13/2023

BillingService coverage

  • Adds test coverage for BillingService.ts (95%)
  • Adds LCOV as a reporter (though /coverage is ignored). This is useful to combine it with Coverage Gutters VS code extension to see the coverage
  • Adds a __mocks__ directory that would contain external libraries mocks (e.g Stripe)
  • Moves BillingService.ts string errors to a separate Errors.ts file
  • Sets collectCoverage: false on jest config to improve test speed
  • Adds coverage script to package.json

Pull Request Checklist:

  • Please make sure all jobs pass before requesting a review.
  • Put closes #XXXX in your comment to auto-close the issue that your PR fixes (if such).
  • Have you lint your code locally before submission?
  • Did you write tests where appropriate?

Screenshots (if appropriate):

*Originally created by @fedealconada on 11/13/2023* ### BillingService coverage - Adds test coverage for `BillingService.ts` (95%) - Adds LCOV as a reporter (though /coverage is ignored). This is useful to combine it with [Coverage Gutters VS](https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters) code extension to see the coverage - Adds a `__mocks__` directory that would contain external libraries mocks (e.g Stripe) - Moves `BillingService.ts` string errors to a separate Errors.ts file - Sets `collectCoverage: false` on jest config to improve test speed - Adds coverage script to package.json ### Pull Request Checklist: - [ ] Please make sure all jobs pass before requesting a review. - [ ] Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if such). - [ ] Have you lint your code locally before submission? - [ ] Did you write tests where appropriate? ### Related Issue? ### Screenshots (if appropriate):
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/oneuptime#1505