Skip to content

Commit cd37f7f

Browse files
committed
chore: Remove commented code
1 parent 399618b commit cd37f7f

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

tests/unit/components/Datepicker.spec.ts

+23-9
Original file line numberDiff line numberDiff line change
@@ -302,27 +302,42 @@ describe('Logic connection', () => {
302302
});
303303

304304
it('Should correctly set today when preset-dates its a function and selected 2 days later', async () => {
305-
vi.useFakeTimers()
306-
vi.setSystemTime(new Date('2000-01-01T00:00:00.000Z'))
305+
vi.useFakeTimers();
306+
vi.setSystemTime(new Date('2000-01-01T00:00:00.000Z'));
307307

308308
const { dp, menu } = await mountDatepicker({
309309
modeValue: null,
310310
range: true,
311-
presetDates: [{ label: 'Today', value: () => [startOfDay(new Date()), endOfDay(new Date())], testId: 'TodayPresetBtn' }],
311+
presetDates: [
312+
{
313+
label: 'Today',
314+
value: () => [startOfDay(new Date()), endOfDay(new Date())],
315+
testId: 'TodayPresetBtn',
316+
},
317+
],
312318
});
313319

314320
await menu.find('[data-test-id="TodayPresetBtn"]').trigger('click');
315321

316-
expect(dp.vm.internalModelValue).toEqual([startOfDay(new Date('2000-01-01T00:00:00.000Z')), endOfDay(new Date('2000-01-01T00:00:00.000Z'))]);
322+
expect(dp.vm.internalModelValue).toEqual([
323+
startOfDay(new Date('2000-01-01T00:00:00.000Z')),
324+
endOfDay(new Date('2000-01-01T00:00:00.000Z')),
325+
]);
317326

318-
setTimeout(async () => await menu.find('[data-test-id="TodayPresetBtn"]').trigger('click'), 1000 * 60 * 60 * 48) //
327+
setTimeout(
328+
async () => await menu.find('[data-test-id="TodayPresetBtn"]').trigger('click'),
329+
1000 * 60 * 60 * 48,
330+
); //
319331

320-
vi.runAllTimers()
332+
vi.runAllTimers();
321333

322-
expect(dp.vm.internalModelValue).toEqual([startOfDay(new Date('2000-01-03T00:00:00.000Z')), endOfDay(new Date('2000-01-03T00:00:00.000Z'))]);
334+
expect(dp.vm.internalModelValue).toEqual([
335+
startOfDay(new Date('2000-01-03T00:00:00.000Z')),
336+
endOfDay(new Date('2000-01-03T00:00:00.000Z')),
337+
]);
323338

324339
dp.unmount();
325-
vi.useRealTimers()
340+
vi.useRealTimers();
326341
});
327342

328343
it('Should select week', async () => {
@@ -607,7 +622,6 @@ describe('Logic connection', () => {
607622
});
608623

609624
it('Should get calendar days', async () => {
610-
// const { getCalendarDays } = useUtils({ weekStart: 1, hideOffsetDates: false } as AllPropsType);
611625
const { datePicker } = await mountDatepicker({
612626
weekStart: 1,
613627
});

0 commit comments

Comments
 (0)