Skip to content

Commit 7e1a34c

Browse files
authored
Merge pull request #56459 from parasharrajat/parasharrajat/fix-test
[No QA] Fix flaky tests
2 parents 3986069 + 19fa19d commit 7e1a34c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/unit/SubscriptionUtilsTest.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,7 @@ describe('SubscriptionUtils', () => {
489489
[`${ONYXKEYS.COLLECTION.POLICY}${policyID}` as const]: {
490490
...createRandomPolicy(Number(policyID)),
491491
ownerAccountID,
492+
type: CONST.POLICY.TYPE.TEAM,
492493
},
493494
[ONYXKEYS.NVP_FIRST_DAY_FREE_TRIAL]: null,
494495
[ONYXKEYS.NVP_LAST_DAY_FREE_TRIAL]: null,
@@ -502,18 +503,20 @@ describe('SubscriptionUtils', () => {
502503
[`${ONYXKEYS.COLLECTION.POLICY}${policyID}` as const]: {
503504
...createRandomPolicy(Number(policyID)),
504505
ownerAccountID,
506+
type: CONST.POLICY.TYPE.TEAM,
505507
},
506508
[ONYXKEYS.NVP_BILLING_FUND_ID]: 8010,
507509
});
508510
expect(shouldShowDiscountBanner()).toBeFalsy();
509511
});
510512

511-
it.skip('should return true if the date is before the free trial end date or within the 8 days from the trial start date', async () => {
513+
it('should return true if the date is before the free trial end date or within the 8 days from the trial start date', async () => {
512514
await Onyx.multiSet({
513515
[ONYXKEYS.SESSION]: {accountID: ownerAccountID},
514516
[`${ONYXKEYS.COLLECTION.POLICY}${policyID}` as const]: {
515517
...createRandomPolicy(Number(policyID)),
516518
ownerAccountID,
519+
type: CONST.POLICY.TYPE.TEAM,
517520
},
518521
[ONYXKEYS.NVP_FIRST_DAY_FREE_TRIAL]: formatDate(subDays(new Date(), 1), CONST.DATE.FNS_DATE_TIME_FORMAT_STRING),
519522
[ONYXKEYS.NVP_LAST_DAY_FREE_TRIAL]: formatDate(addDays(new Date(), 10), CONST.DATE.FNS_DATE_TIME_FORMAT_STRING),

0 commit comments

Comments
 (0)