File tree Expand file tree Collapse file tree 4 files changed +15
-4
lines changed
Expand file tree Collapse file tree 4 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,8 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
113113 } ,
114114 itemprops : {
115115 type : Function ,
116+
117+ /* istanbul ignore next */
116118 default : function _default ( ) { }
117119 }
118120 } ,
Original file line number Diff line number Diff line change 101101 } ,
102102 itemprops : {
103103 type : Function ,
104+ /* istanbul ignore next */
104105 default ( ) { }
105106 }
106107 } ,
Original file line number Diff line number Diff line change @@ -76,9 +76,11 @@ describe(theme, () => {
7676 } )
7777
7878 it ( `[${ theme } ] check update correct.` , ( ) => {
79+ const list = wrapper . find ( '.list' )
80+ const listEl = list . vm . $el
7981 const vmData = wrapper . vm . $data
80- const listEl = wrapper . find ( '.list' ) . vm . $el
8182
83+ let itemFrags
8284 let expectOutsideHeight
8385
8486 // change size and check shape.
@@ -96,7 +98,13 @@ describe(theme, () => {
9698 expect ( listEl . style . height ) . toBe ( expectOutsideHeight )
9799
98100 vmData . bench = 66
99- const itemFrags = wrapper . findAll ( '.for-item' )
101+ itemFrags = wrapper . findAll ( '.for-item' )
100102 expect ( itemFrags . length ) . toBe ( vmData . remian + 66 )
103+
104+ vmData . items = getIndexList ( 7 )
105+ listEl . scrollTop = 1000 // over scroll.
106+ list . trigger ( 'scroll' )
107+ itemFrags = wrapper . findAll ( '.for-item' )
108+ expect ( itemFrags . length ) . toBe ( 7 )
101109 } )
102110} )
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ describe(theme, () => {
5151
5252 data ( ) {
5353 return {
54- start : 0 ,
54+ start : 5 ,
5555 size : initSize ,
5656 remian : initRemian ,
5757 items : getVariableList ( listCount )
@@ -79,7 +79,7 @@ describe(theme, () => {
7979 // no cache init.
8080 const list = wrapper . find ( '.list' )
8181 const listDelta = list . vm . delta
82- expect ( Object . keys ( listDelta . varCache ) . length = == 0 ) . toBe ( true )
82+ expect ( Object . keys ( listDelta . varCache ) . length ! == 0 ) . toBe ( true )
8383 } )
8484
8585 it ( `[${ theme } ] check update.` , ( ) => {
You can’t perform that action at this time.
0 commit comments