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 = {
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);