diff --git a/libs/portal/stalker/feature/src/lib/stalker-account-info/stalker-account-info.component.spec.ts b/libs/portal/stalker/feature/src/lib/stalker-account-info/stalker-account-info.component.spec.ts index 67191a626..58449c15f 100644 --- a/libs/portal/stalker/feature/src/lib/stalker-account-info/stalker-account-info.component.spec.ts +++ b/libs/portal/stalker/feature/src/lib/stalker-account-info/stalker-account-info.component.spec.ts @@ -26,14 +26,16 @@ describe('StalkerAccountInfoComponent', () => { const freshSnapshot = { login: 'user-42', - expireDate: Math.round(Date.now() / 1000) + 30 * 86_400, + // floor, not round: rounding the epoch up puts the expiry a few + // hundred ms past the 30-day mark and ceil() then yields 31. + expireDate: Math.floor(Date.now() / 1000) + 30 * 86_400, tariffPlanName: 'Premium', status: 1, }; const cachedSnapshot = { login: 'cached-user', - expireDate: Math.round(Date.now() / 1000) + 3 * 86_400, + expireDate: Math.floor(Date.now() / 1000) + 3 * 86_400, tariffPlanName: 'Basic', status: 1, };