Skip to content

Commit

Permalink
fix: add assertion for invoice payment failure
Browse files Browse the repository at this point in the history
  • Loading branch information
DhananjayPurohit committed Aug 5, 2024
1 parent b7d203d commit cd29822
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions clients/apps/nodejs/test/tb04-simple-lightning-latch.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,11 @@ describe('TB04 - Lightning Latch', function() {
const paymentHashSecond = "f768c404215f9fb5731c32c00fe7a057fc181d7695de447b334380d90674db34"
const invoiceSecond = await generateInvoice(paymentHashSecond, amount);

await payInvoice(invoiceSecond.payment_request);
})
try {
await payInvoice(invoiceSecond.payment_request);
} catch (error) {
console.error('Error:', error);
expect(error.message).to.include('failed');
}
})
})

0 comments on commit cd29822

Please sign in to comment.