Repository navigation
test(payments): add unit tests for the zebedee, opennode, nodeless and lnurl processors - #917
Conversation
…d lnurl processors Signed-off-by: Priyanshubhartistm <bhartipriyanshustm@gmail.com>
🦋 Changeset detectedLatest commit: 2176a32 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
[Low impact] The PR appears safe to merge; no actionable issues remain.
|
Coverage Report for CI Build 41229356259Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage increased (+0.5%) to 77.211%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
Signed-off-by: Priyanshubhartistm <bhartipriyanshustm@gmail.com>
Description
Adds unit specs for the four payment processors that had none, next to the existing lnbits and nwc ones (
test/unit/payments-processors/). No production code changes.For each processor:
createInvoice: the request sent to the provider (url, body, amount unit, callback url / metadata, ttl) and the mapping of the response to anInvoice; msats are converted to whole sats where the provider takes sats; provider outages and responses without data are not swallowed.getInvoice: the request, every provider status mapped toInvoiceStatus(a status the provider adds later is never read as paid), confirmation dates, and error propagation.lightning_invoice/lightningfallback andamount/pricefallback; Nodeless's 15 minute fallback expiry; LNURL's generated invoice id and verify-url polling.Related Issue
Closes #903
Motivation and Context
These are the money-moving code paths for four providers. A misread status or a wrong amount unit is a funds bug, and nothing covered them.
How Has This Been Tested?
transform.tsor changing OpenNode's ttl makes the matching spec fail.pnpm lint,pnpm check:deps,pnpm run build:check,pnpm run test:unit.Screenshots (if appropriate):
Types of changes
Checklist: