Skip to content

Commit

Permalink
test: fixed test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
t1m0n committed May 18, 2022
1 parent 98d2fc3 commit ce53cd0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
5 changes: 2 additions & 3 deletions index-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ let opts = {
// return d.toLocaleDateString();
// })
},
// onRenderCell({type}) {
// console.log('render', type);
// },
onRenderCell(cell) {
},
// visible: true
}

Expand Down
2 changes: 1 addition & 1 deletion src/datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function buildDatepickersContainer(id) {

export default class Datepicker {
static defaults = defaults
static version = '3.1.0'
static version = '3.1.1'
static defaultContainerId = 'air-datepicker-global-container'
constructor(el, opts) {
this.$el = getEl(el);
Expand Down
2 changes: 2 additions & 0 deletions tests/events.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ describe('EVENTS TEST', () => {
formattedDate;

init({
visible: true,
multipleDates: true,
onSelect(data) {
date = data.date;
Expand Down Expand Up @@ -140,6 +141,7 @@ describe('EVENTS TEST', () => {
datepicker;

init({
visible: true,
onRenderCell(data) {
date = data.date;
cellType = data.cellType;
Expand Down
5 changes: 4 additions & 1 deletion tests/options.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,12 @@ describe('OPTIONS TESTS', () => {
expect($datepicker.querySelector('[data-action="prev"]')).not.toHaveClass('-disabled-');
});
test('"prev" button should be disabled in months view', () => {
let minDate = new Date('2021-06-27');

init({
startDate: minDate,
view: 'months',
minDate: new Date('2021-06-27'),
minDate,
});

expect($datepicker.querySelector('[data-action="prev"]')).toHaveClass('-disabled-');
Expand Down

0 comments on commit ce53cd0

Please sign in to comment.