Skip to content

Commit 697d090

Browse files
committed
Adjust blockedDate calculation in PaymasterWorker test
Updates the blockedDate assignment to subtract days based on expectedDaysAfterBlock in the PaymasterWorker test, improving test accuracy for blocked subscriptions.
1 parent 39f6a19 commit 697d090

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

workers/paymaster/tests/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ describe('PaymasterWorker', () => {
282282
subscriptionId: 'some-subscription-id',
283283
lastChargeDate,
284284
isBlocked: true,
285-
blockedDate: new Date(currentDate.getTime()),
285+
blockedDate: new Date(currentDate.getTime() - (expectedDaysAfterBlock ? expectedDaysAfterBlock * 24 * 60 * 60 * 1000 : 0)),
286286
billingPeriodEventsCount: 10,
287287
});
288288

0 commit comments

Comments
 (0)