File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 129129 immediate: true ,
130130 handler (val ) {
131131 if (val && val < this .activePage ) {
132- this .$emit (' update:activePage' , val)
132+ this .$emit (' update:activePage' , val, true )
133133 }
134134 }
135135 }
187187 if (number === this .activePage ) {
188188 return
189189 }
190- this .$emit (' update:activePage' , number)
190+ this .$emit (' update:activePage' , number, false )
191191 if (e) {
192192 this .changeFocus (e)
193193 }
Original file line number Diff line number Diff line change @@ -37,15 +37,15 @@ describe(ComponentName, () => {
3737 } )
3838 it ( 'emits update:activePage event when number of pages change' , ( ) => {
3939 customWrapper . setProps ( { pages : 6 } )
40- expect ( customWrapper . emitted ( ) [ 'update:activePage' ] ) . toBeTruthy ( )
40+ expect ( customWrapper . emitted ( ) [ 'update:activePage' ] [ 0 ] ) . toMatchObject ( [ 6 , true ] )
4141 } )
4242 it ( 'emits update:activePage event when inactive item is clicked' , ( ) => {
4343 const links = wrapper . findAll ( '.page-link' )
4444 links . at ( 2 ) . trigger ( 'click' )
4545 expect ( wrapper . emitted ( ) [ 'update:activePage' ] ) . not . toBeTruthy ( )
4646
4747 links . at ( 4 ) . trigger ( 'click' )
48- expect ( wrapper . emitted ( ) [ 'update:activePage' ] ) . toBeTruthy ( )
48+ expect ( wrapper . emitted ( ) [ 'update:activePage' ] [ 0 ] ) . toMatchObject ( [ 3 , false ] )
4949 } )
5050 it ( 'calls focus function when clicked on numeric item' , ( ) => {
5151 const spy = jest . spyOn ( wrapper . vm , 'changeFocus' )
You can’t perform that action at this time.
0 commit comments