Skip to content

Commit

Permalink
Chore: Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
sandypockets committed Dec 9, 2023
1 parent 19645ec commit 058917a
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 77 deletions.
6 changes: 3 additions & 3 deletions __tests__/datePicker.darkMode.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import DatePicker from "../src/datePicker";
import DatePicker from '../src/datePicker';

describe('Dark/light mode UI', () => {
let datePicker;
Expand All @@ -12,7 +12,7 @@ describe('Dark/light mode UI', () => {
datePicker = new DatePicker(containerId, {
mode: 'single',
onSelect: jest.fn(),
darkMode: true
darkMode: true,
});
datePicker.init();

Expand All @@ -24,7 +24,7 @@ describe('Dark/light mode UI', () => {
datePicker = new DatePicker(containerId, {
mode: 'single',
onSelect: jest.fn(),
darkMode: false
darkMode: false,
});
datePicker.init();

Expand Down
11 changes: 6 additions & 5 deletions __tests__/datePicker.interactions.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import DatePicker from '../src/datePicker'
import { getMonthName } from '../src/utils'
import DatePicker from '../src/datePicker';
import { getMonthName } from '../src/utils';

describe('Interactions and basic functionality', () => {
let datePicker;
Expand All @@ -11,7 +11,8 @@ describe('Interactions and basic functionality', () => {
mode: 'single',
onSelect: jest.fn(),
blockedDays: [0, 6], // Sundays and Saturdays
showDayNames: true
showDayNames: true,
selectPastDatesEnabled: true,
});
datePicker.init();
});
Expand Down Expand Up @@ -81,7 +82,7 @@ describe('Interactions and basic functionality', () => {
datePicker.selectedEndDate = new Date(2023, 5, 15);
const newStartDate = new Date(2023, 5, 20);
datePicker.handleDayClick(newStartDate.getDate(), newStartDate.getMonth());
expect(datePicker.selectedStartDate).toEqual(newStartDate);
expect(datePicker.selectedStartDate.toString()).toMatch(newStartDate.toString());
expect(datePicker.selectedEndDate).toBeNull();
});
});
});
6 changes: 3 additions & 3 deletions __tests__/datePicker.leapYear.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import DatePicker from '../src/datePicker'
import DatePicker from '../src/datePicker';

describe('Leap year handling', () => {
let datePicker;
Expand All @@ -10,7 +10,7 @@ describe('Leap year handling', () => {
mode: 'single',
onSelect: jest.fn(),
blockedDays: [0, 6], // Sundays and Saturdays
showDayNames: true
showDayNames: true,
});
datePicker.init();
});
Expand All @@ -28,4 +28,4 @@ describe('Leap year handling', () => {
const days = datePicker.element.querySelectorAll('.datepicker-day.current-month');
expect(days.length).toBe(29);
});
});
});
Loading

0 comments on commit 058917a

Please sign in to comment.