File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -136,14 +136,14 @@ describe('Datepicker Plugin', () => {
136
136
setTimeout ( ( ) => {
137
137
expect ( input . value )
138
138
. withContext ( 'value should change with confirm interaction' )
139
- . toEqual ( `${ month < 10 ? `0${ month } ` : month } /0 ${ day } /${ year } ` ) ;
139
+ . toEqual ( `${ month < 10 ? `0${ month } ` : month } /${ day < 10 ? '0' + day : day } /${ year } ` ) ;
140
140
dayEl = document . querySelector ( '.datepicker-container button[data-day="1"]' ) ;
141
141
dayEl . dispatchEvent ( new MouseEvent ( 'click' , { bubbles : true , cancelable : true } ) ) ;
142
142
cancelBtn . dispatchEvent ( new MouseEvent ( 'click' , { bubbles : true , cancelable : true } ) ) ;
143
143
setTimeout ( ( ) => {
144
144
expect ( input . value )
145
145
. withContext ( 'value should not change with cancel interaction' )
146
- . toEqual ( `${ month < 10 ? `0${ month } ` : month } /0 ${ day } /${ year } ` ) ;
146
+ . toEqual ( `${ month < 10 ? `0${ month } ` : month } /${ day < 10 ? '0' + day : day } /${ year } ` ) ;
147
147
clearBtn . dispatchEvent ( new MouseEvent ( 'click' , { bubbles : true , cancelable : true } ) ) ;
148
148
setTimeout ( ( ) => {
149
149
expect ( input . value . length )
@@ -156,7 +156,7 @@ describe('Datepicker Plugin', () => {
156
156
} , 10 ) ;
157
157
} , 10 ) ;
158
158
} , 10 ) ;
159
- } ) ;
159
+ } , 10 ) ;
160
160
} ) ;
161
161
} ) ;
162
162
} ) ;
You can’t perform that action at this time.
0 commit comments