Remove client-side isLoggedIn value
[ProtonMail-WebClient.git] / packages / shared / test / spotlight / spotlight.spec.ts
blob85f0be47b44b3acb26c6a096a8cdef6c7836397f
1 import { getEnvironmentDate } from '@proton/shared/lib/spotlight/helpers';
2 import type { SpotlightDate } from '@proton/shared/lib/spotlight/interface';
4 describe('Spotlight', () => {
5     describe('getEnvironmentDate', () => {
6         const defaultDate = Date.UTC(2022, 1, 1, 12);
7         const betaDate = Date.UTC(2023, 1, 1, 12);
8         const alphaDate = Date.UTC(2024, 1, 1, 12);
10         const dates: SpotlightDate = {
11             default: defaultDate,
12             beta: betaDate,
13             alpha: alphaDate,
14         };
16         it('should return the expected dates depending on the current environement', () => {
17             expect(getEnvironmentDate(undefined, dates)).toBe(defaultDate);
18             expect(getEnvironmentDate('default', dates)).toBe(defaultDate);
19             expect(getEnvironmentDate('beta', dates)).toBe(betaDate);
20             expect(getEnvironmentDate('alpha', dates)).toBe(alphaDate);
21         });
22     });
23 });