From e6fe8b6b86c86358635c7734efccaac137e4bb97 Mon Sep 17 00:00:00 2001 From: jaydamani Date: Tue, 23 Jul 2024 21:19:43 +0530 Subject: [PATCH 1/3] fix(tests/SubscriptionUtils): update time for testing non-overdue --- tests/unit/SubscriptionUtilsTest.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/SubscriptionUtilsTest.ts b/tests/unit/SubscriptionUtilsTest.ts index c997e6f0048a..bfac0b065170 100644 --- a/tests/unit/SubscriptionUtilsTest.ts +++ b/tests/unit/SubscriptionUtilsTest.ts @@ -14,7 +14,7 @@ const billingGraceEndPeriod: BillingGraceEndPeriod = { }; const GRACE_PERIOD_DATE = new Date().getTime() + 1000; -const GRACE_PERIOD_DATE_OVERDUE = new Date().getTime() - 1000; +const GRACE_PERIOD_DATE_OVERDUE = new Date().getTime() - 1000*3600; const AMOUNT_OWED = 100; const STRIPE_CUSTOMER_ID: StripeCustomerID = { From 918eda0cc1013f3ee4a651e04d7109fe05f1c2fc Mon Sep 17 00:00:00 2001 From: jaydamani Date: Tue, 23 Jul 2024 23:36:55 +0530 Subject: [PATCH 2/3] fix: update correct period --- tests/unit/SubscriptionUtilsTest.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/SubscriptionUtilsTest.ts b/tests/unit/SubscriptionUtilsTest.ts index bfac0b065170..30f0e8b56c89 100644 --- a/tests/unit/SubscriptionUtilsTest.ts +++ b/tests/unit/SubscriptionUtilsTest.ts @@ -13,8 +13,8 @@ const billingGraceEndPeriod: BillingGraceEndPeriod = { value: 0, }; -const GRACE_PERIOD_DATE = new Date().getTime() + 1000; -const GRACE_PERIOD_DATE_OVERDUE = new Date().getTime() - 1000*3600; +const GRACE_PERIOD_DATE = new Date().getTime() + 1000*3600; +const GRACE_PERIOD_DATE_OVERDUE = new Date().getTime() - 1000; const AMOUNT_OWED = 100; const STRIPE_CUSTOMER_ID: StripeCustomerID = { From c3671691a41d1bf34fa1c5c80ba064a5f890f736 Mon Sep 17 00:00:00 2001 From: jaydamani Date: Wed, 24 Jul 2024 05:21:31 +0530 Subject: [PATCH 3/3] lint: code cleaup --- tests/unit/SubscriptionUtilsTest.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/SubscriptionUtilsTest.ts b/tests/unit/SubscriptionUtilsTest.ts index 30f0e8b56c89..8c18546f0e76 100644 --- a/tests/unit/SubscriptionUtilsTest.ts +++ b/tests/unit/SubscriptionUtilsTest.ts @@ -13,7 +13,7 @@ const billingGraceEndPeriod: BillingGraceEndPeriod = { value: 0, }; -const GRACE_PERIOD_DATE = new Date().getTime() + 1000*3600; +const GRACE_PERIOD_DATE = new Date().getTime() + 1000 * 3600; const GRACE_PERIOD_DATE_OVERDUE = new Date().getTime() - 1000; const AMOUNT_OWED = 100;