From a6d719207dc674b8db98017ce4d067745ef0dcca Mon Sep 17 00:00:00 2001 From: Blair Currey <12960453+BlairCurrey@users.noreply.github.com> Date: Tue, 18 Jun 2024 11:53:22 -0400 Subject: [PATCH] fix: test --- .../src/open_payments/payment/outgoing/service.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/open_payments/payment/outgoing/service.test.ts b/packages/backend/src/open_payments/payment/outgoing/service.test.ts index e5bc874f9b..7084fc7dfd 100644 --- a/packages/backend/src/open_payments/payment/outgoing/service.test.ts +++ b/packages/backend/src/open_payments/payment/outgoing/service.test.ts @@ -531,7 +531,7 @@ describe('OutgoingPaymentService', (): void => { for (let i = 0; i < 3; i++) { const payment = await outgoingPaymentService.create(options) assert.ok(!isOutgoingPaymentError(payment)) - expect(payment.grantSpentDebitAmount?.value).toBe( + expect(payment.grantSpentDebitAmount?.value ?? 0).toBe( BigInt(debitAmount.value * BigInt(i)) ) } @@ -576,7 +576,7 @@ describe('OutgoingPaymentService', (): void => { for (let i = 0; i < 3; i++) { const payment = await outgoingPaymentService.create(options) assert.ok(!isOutgoingPaymentError(payment)) - expect(payment.grantSpentReceiveAmount?.value).toBe( + expect(payment.grantSpentReceiveAmount?.value ?? 0).toBe( // Must account for interledger/pay off-by-one issue (even with 0 slippage/fees) BigInt((debitAmount.value - BigInt(1)) * BigInt(i)) )