Skip to content

sponsors.service.spec.ts has no test for activeBounties(), activeMilestones(), or milestoneProgress() #141

Description

@chonilius

src/sponsors/sponsors.service.spec.ts has describe blocks for budgetLocked, totalSpend, and dashboard (6 tests total) — there is no test for activeBounties() (the terminal-status-exclusion query builder), activeMilestones() (the FUNDED/IN_PROGRESS OR-condition query), or milestoneProgress() (the distributed / budget ratio computation, including its budget > 0 guard against division by zero). dashboard()'s test only verifies the recentPayments join condition, not that it correctly assembles all five fields including activeBounties/activeMilestones from the other (untested) methods it calls via Promise.all.

Fix: add direct test coverage for activeBounties (verifying the terminal-status exclusion list), activeMilestones (verifying both status branches of the where: [...] OR), and milestoneProgress (including the zero-budget edge case).

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programenhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is neededtestingTesting/QA infrastructure

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions