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 129
129
immediate: true ,
130
130
handler (val ) {
131
131
if (val && val < this .activePage ) {
132
- this .$emit (' update:activePage' , val)
132
+ this .$emit (' update:activePage' , val, true )
133
133
}
134
134
}
135
135
}
187
187
if (number === this .activePage ) {
188
188
return
189
189
}
190
- this .$emit (' update:activePage' , number)
190
+ this .$emit (' update:activePage' , number, false )
191
191
if (e) {
192
192
this .changeFocus (e)
193
193
}
Original file line number Diff line number Diff line change @@ -37,15 +37,15 @@ describe(ComponentName, () => {
37
37
} )
38
38
it ( 'emits update:activePage event when number of pages change' , ( ) => {
39
39
customWrapper . setProps ( { pages : 6 } )
40
- expect ( customWrapper . emitted ( ) [ 'update:activePage' ] ) . toBeTruthy ( )
40
+ expect ( customWrapper . emitted ( ) [ 'update:activePage' ] [ 0 ] ) . toMatchObject ( [ 6 , true ] )
41
41
} )
42
42
it ( 'emits update:activePage event when inactive item is clicked' , ( ) => {
43
43
const links = wrapper . findAll ( '.page-link' )
44
44
links . at ( 2 ) . trigger ( 'click' )
45
45
expect ( wrapper . emitted ( ) [ 'update:activePage' ] ) . not . toBeTruthy ( )
46
46
47
47
links . at ( 4 ) . trigger ( 'click' )
48
- expect ( wrapper . emitted ( ) [ 'update:activePage' ] ) . toBeTruthy ( )
48
+ expect ( wrapper . emitted ( ) [ 'update:activePage' ] [ 0 ] ) . toMatchObject ( [ 3 , false ] )
49
49
} )
50
50
it ( 'calls focus function when clicked on numeric item' , ( ) => {
51
51
const spy = jest . spyOn ( wrapper . vm , 'changeFocus' )
You can’t perform that action at this time.
0 commit comments