Skip to content

test: add MilestonesService unit tests#27

Merged
Alqku merged 1 commit into
OrbitChainLabs:mainfrom
Adeolu01:test/service-unit-coverage
Jun 20, 2026
Merged

test: add MilestonesService unit tests#27
Alqku merged 1 commit into
OrbitChainLabs:mainfrom
Adeolu01:test/service-unit-coverage

Conversation

@Adeolu01

Copy link
Copy Markdown
Contributor

Closes #20

The repository had a single spec file (src/app.controller.spec.ts) and no service-level coverage, making the donation/campaign/refund flows costly to change safely.

This PR adds unit tests for MilestonesService — one of the highest-risk modules called out in the issue — with PrismaService fully mocked (no DB or Horizon/Soroban RPC). Coverage includes fund-release authorization, milestone-status guards, amount validation, duplicate-pending rejection, cancellation rules, and status aggregation.

It establishes the mocked-Prisma pattern that follow-up PRs can extend to the remaining services (DonationsService, CampaignsService, StellarTransactionsService, SorobanService), the requested e2e endpoints, and the CI coverage-threshold wiring (#18).

@Alqku

Alqku commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

@Adeolu01 please fix the failing CI.

Alqku commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Nice coverage on MilestonesService — closes the gap cleanly. Thanks for putting this together.

@Alqku Alqku merged commit abef0f0 into OrbitChainLabs:main Jun 20, 2026
0 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[LOW] — Service layer is largely untested; only app.controller.spec.ts exists across the entire src/ tree

2 participants