1 import { END_TYPE, FREQUENCY } from '@proton/shared/lib/calendar/constants';
3 import getFrequencyModelChange from './getFrequencyModelChange';
5 const frequencyModel = {
6 type: FREQUENCY.CUSTOM,
7 frequency: FREQUENCY.DAILY,
25 until: new Date('2020-07-16T00:00:00.000Z'),
29 describe('Form update', () => {
30 it('should update end date if new start date is in the future', () => {
31 const newDate = new Date('2020-09-09T11:30:00.000Z');
32 const { ends } = getFrequencyModelChange(
34 date: new Date('2020-05-16T00:00:00.000Z'),
41 expect(+ends.until).toBe(+newDate);