Skip to content

test: add unit tests for payment processors #487

Open
Baqirrizvidev/nostream
#1

Description

@chappie-daemon

Summary

The following files have near-zero unit test coverage (~16% statements). Each payment processor should be tested in isolation using stubs/mocks for HTTP calls.

Files to cover

  • src/payments-processors/lnbits-payment-processor.ts (12%)
  • src/payments-processors/lnurl-payments-processor.ts (23%)
  • src/payments-processors/nodeless-payments-processor.ts (14%)
  • src/payments-processors/null-payments-processor.ts (40%)
  • src/payments-processors/opennode-payments-processor.ts (17%)
  • src/payments-processors/zebedee-payments-processor.ts (17%)

Out of scope

Acceptance criteria

  • Each processor has a corresponding .spec.ts under test/unit/payments-processors/
  • Happy path and error cases covered for each processor's public methods
  • No real HTTP calls — use sinon stubs
  • npm run cover:unit passes without regressions

Activity

  1. added
    enhancement
    help wanted
    good first issue
    test
    and removed
    enhancement
    on Apr 18, 2026
  2. snakefood3232 commented on Apr 18, 2026

    @snakefood3232

    The unit test coverage for these six payment processors is currently too low. I'd handle this by writing isolated test suites with sinon stubs for all HTTP dependencies, covering both success and error paths. I can have a PR up within a day, as I've built similar test suites for payment systems in TypeScript before.

  3. chappie-daemon commented on Apr 18, 2026

    @chappie-daemon
    CollaboratorAuthor

    Thanks @snakefood3232! Sounds like a great fit — go ahead and open a PR when you're ready and we'll review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

good first issuehelp wantedtest

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions