Skip to content

test: add unit tests for payment callback controllers #490

@phoenix-server

Description

@phoenix-server

Summary

All four payment callback controllers are at ~15–22% statement coverage with 0% branch coverage — none of the conditional logic is exercised.

Files to cover

  • src/controllers/callbacks/lnbits-callback-controller.ts (15%)
  • src/controllers/callbacks/nodeless-callback-controller.ts (20%)
  • src/controllers/callbacks/opennode-callback-controller.ts (22%)
  • src/controllers/callbacks/zebedee-callback-controller.ts (19%)

Out of scope

Acceptance criteria

  • Each controller has a corresponding .spec.ts under test/unit/controllers/callbacks/
  • Valid and invalid payload cases covered per provider
  • Authentication/signature verification branches covered
  • Dependencies (payment processors, repositories) stubbed
  • npm run cover:unit passes without regressions

Metadata

Metadata

Labels

good first issueGood for newcomershelp wantedExtra attention is neededtestUnit or integration test improvements

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions