@@ -159,7 +159,6 @@ describe("Calendar", function() {
159
159
expect ( yearReadView ) . to . have . length ( 1 ) ;
160
160
} ) ;
161
161
162
-
163
162
it ( "should show only one year dropdown menu if toggled on and multiple month mode on" , function ( ) {
164
163
const calendar = getCalendar ( { showYearDropdown : true , monthsShown : 2 } ) ;
165
164
const monthReadView = calendar . find ( YearDropdown ) ;
@@ -236,7 +235,6 @@ describe("Calendar", function() {
236
235
} ) ;
237
236
238
237
it ( "when clicking disabled month navigation, should not change month" , function ( ) {
239
-
240
238
const calendar = getCalendar ( {
241
239
minDate : utils . newDate ( ) ,
242
240
maxDate : utils . newDate ( ) ,
@@ -267,7 +265,6 @@ describe("Calendar", function() {
267
265
} ) ;
268
266
269
267
it ( "when clicking non-disabled month navigation, should change month" , function ( ) {
270
-
271
268
const calendar = getCalendar ( {
272
269
selected : utils . newDate ( ) ,
273
270
minDate : utils . subtractMonths ( utils . newDate ( ) , 3 ) ,
@@ -293,7 +290,6 @@ describe("Calendar", function() {
293
290
} ) ;
294
291
} ) ;
295
292
296
-
297
293
it ( "should not show the month dropdown menu by default" , function ( ) {
298
294
const calendar = getCalendar ( ) ;
299
295
const monthReadView = calendar . find ( MonthDropdown ) ;
@@ -319,24 +315,26 @@ describe("Calendar", function() {
319
315
} ) ;
320
316
321
317
it ( "should show the month-year dropdown menu if toggled on" , function ( ) {
322
- const calendar = getCalendar ( { showMonthYearDropdown : true ,
323
- minDate : utils . subtractYears ( utils . newDate ( ) , 1 ) ,
324
- maxDate : utils . addYears ( utils . newDate ( ) , 1 ) } ) ;
318
+ const calendar = getCalendar ( {
319
+ showMonthYearDropdown : true ,
320
+ minDate : utils . subtractYears ( utils . newDate ( ) , 1 ) ,
321
+ maxDate : utils . addYears ( utils . newDate ( ) , 1 )
322
+ } ) ;
325
323
const monthYearReadView = calendar . find ( MonthYearDropdown ) ;
326
324
expect ( monthYearReadView ) . to . have . length ( 1 ) ;
327
325
} ) ;
328
326
329
-
330
327
it ( "should show only one month-year dropdown menu if toggled on and multiple month mode on" , function ( ) {
331
- const calendar = getCalendar ( { showMonthYearDropdown : true ,
332
- minDate : utils . subtractYears ( utils . newDate ( ) , 1 ) ,
333
- maxDate : utils . addYears ( utils . newDate ( ) , 1 ) ,
334
- monthsShown : 2 } ) ;
328
+ const calendar = getCalendar ( {
329
+ showMonthYearDropdown : true ,
330
+ minDate : utils . subtractYears ( utils . newDate ( ) , 1 ) ,
331
+ maxDate : utils . addYears ( utils . newDate ( ) , 1 ) ,
332
+ monthsShown : 2
333
+ } ) ;
335
334
const monthReadView = calendar . find ( MonthYearDropdown ) ;
336
335
expect ( monthReadView ) . to . have . length ( 1 ) ;
337
336
} ) ;
338
337
339
-
340
338
it ( "should not show the today button by default" , function ( ) {
341
339
const calendar = getCalendar ( ) ;
342
340
const todayButton = calendar . find ( ".react-datepicker__today-button" ) ;
@@ -616,17 +614,28 @@ describe("Calendar", function() {
616
614
} ) ;
617
615
618
616
it ( "calls onYearChange prop when selection is changed from month-year dropdown" , ( ) => {
619
- const option = calendar . find ( MonthYearDropdown ) . find ( "select" ) . find ( "option" ) . at ( 3 ) ;
617
+ const option = calendar
618
+ . find ( MonthYearDropdown )
619
+ . find ( "select" )
620
+ . find ( "option" )
621
+ . at ( 3 ) ;
620
622
option . simulate ( "change" ) ;
621
623
622
624
assert ( onYearChangeSpy . called === true , "onYearChange should be called" ) ;
623
625
} ) ;
624
626
625
627
it ( "calls onMonthChange prop when selection is changed from month-year dropdown" , ( ) => {
626
- const option = calendar . find ( MonthYearDropdown ) . find ( "select" ) . find ( "option" ) . at ( 3 ) ;
628
+ const option = calendar
629
+ . find ( MonthYearDropdown )
630
+ . find ( "select" )
631
+ . find ( "option" )
632
+ . at ( 3 ) ;
627
633
option . simulate ( "change" ) ;
628
634
629
- assert ( onMonthChangeSpy . called === true , "onMonthChange should be called" ) ;
635
+ assert (
636
+ onMonthChangeSpy . called === true ,
637
+ "onMonthChange should be called"
638
+ ) ;
630
639
} ) ;
631
640
} ) ;
632
641
0 commit comments