@@ -23,11 +23,11 @@ describe('uiScroll Paddings spec.', () => {
23
23
viewportHeight : viewportHeight
24
24
} ;
25
25
26
- function appendTitle ( outside , indicies ) {
27
- return ( outside ? ' outside' : ' inside' ) + ' the buffer' + ( indicies ? ' when min/max indicies are set' : '' ) ;
26
+ function appendTitle ( outside , indices ) {
27
+ return ( outside ? ' outside' : ' inside' ) + ' the buffer' + ( indices ? ' when min/max indices are set' : '' ) ;
28
28
}
29
29
30
- function setUserIndicies ( ) {
30
+ function setUserIndices ( ) {
31
31
datasource . minIndex = datasource . min ;
32
32
datasource . maxIndex = datasource . max ;
33
33
}
@@ -96,11 +96,11 @@ describe('uiScroll Paddings spec.', () => {
96
96
describe ( 'Removing items via indexed-based applyUpdates\n' , ( ) => {
97
97
98
98
[ true , false ] . forEach ( outside =>
99
- [ true , false ] . forEach ( userIndicies =>
100
- it ( 'should remove last row' + appendTitle ( outside , userIndicies ) , ( ) =>
99
+ [ true , false ] . forEach ( userIndices =>
100
+ it ( 'should remove last row' + appendTitle ( outside , userIndices ) , ( ) =>
101
101
runTest ( scrollSettings ,
102
102
( viewport , scope ) => {
103
- userIndicies && setUserIndicies ( ) ;
103
+ userIndices && setUserIndices ( ) ;
104
104
105
105
scrollBottom ( viewport , MAX ) ;
106
106
outside && scrollTop ( viewport ) ;
@@ -121,11 +121,11 @@ describe('uiScroll Paddings spec.', () => {
121
121
) ;
122
122
123
123
[ true , false ] . forEach ( outside =>
124
- [ true , false ] . forEach ( userIndicies =>
125
- it ( 'should remove last row and then the next after last' + appendTitle ( outside , userIndicies ) , ( ) =>
124
+ [ true , false ] . forEach ( userIndices =>
125
+ it ( 'should remove last row and then the next after last' + appendTitle ( outside , userIndices ) , ( ) =>
126
126
runTest ( scrollSettings ,
127
127
( viewport , scope ) => {
128
- userIndicies && setUserIndicies ( ) ;
128
+ userIndices && setUserIndices ( ) ;
129
129
130
130
scrollBottom ( viewport , MAX ) ;
131
131
outside && scrollTop ( viewport ) ;
@@ -148,11 +148,11 @@ describe('uiScroll Paddings spec.', () => {
148
148
) ;
149
149
150
150
[ true , false ] . forEach ( outside =>
151
- [ true , false ] . forEach ( userIndicies =>
152
- it ( 'should remove pre-last row' + appendTitle ( outside , userIndicies ) , ( ) =>
151
+ [ true , false ] . forEach ( userIndices =>
152
+ it ( 'should remove pre-last row' + appendTitle ( outside , userIndices ) , ( ) =>
153
153
runTest ( scrollSettings ,
154
154
( viewport , scope ) => {
155
- userIndicies && setUserIndicies ( ) ;
155
+ userIndices && setUserIndices ( ) ;
156
156
157
157
scrollBottom ( viewport , MAX ) ;
158
158
outside && scrollTop ( viewport ) ;
@@ -174,11 +174,11 @@ describe('uiScroll Paddings spec.', () => {
174
174
) ;
175
175
176
176
[ true , false ] . forEach ( outside =>
177
- [ true , false ] . forEach ( userIndicies =>
178
- it ( 'should remove first row' + appendTitle ( outside , userIndicies ) , ( ) =>
177
+ [ true , false ] . forEach ( userIndices =>
178
+ it ( 'should remove first row' + appendTitle ( outside , userIndices ) , ( ) =>
179
179
runTest ( scrollSettings ,
180
180
( viewport , scope ) => {
181
- userIndicies && setUserIndicies ( ) ;
181
+ userIndices && setUserIndices ( ) ;
182
182
183
183
outside && scrollBottom ( viewport , MAX ) ;
184
184
@@ -200,11 +200,11 @@ describe('uiScroll Paddings spec.', () => {
200
200
) ;
201
201
202
202
[ true , false ] . forEach ( outside =>
203
- [ true , false ] . forEach ( userIndicies =>
204
- it ( 'should remove first row and then the next after first' + appendTitle ( outside , userIndicies ) , ( ) =>
203
+ [ true , false ] . forEach ( userIndices =>
204
+ it ( 'should remove first row and then the next after first' + appendTitle ( outside , userIndices ) , ( ) =>
205
205
runTest ( scrollSettings ,
206
206
( viewport , scope ) => {
207
- userIndicies && setUserIndicies ( ) ;
207
+ userIndices && setUserIndices ( ) ;
208
208
209
209
outside && scrollBottom ( viewport , MAX ) ;
210
210
@@ -228,11 +228,11 @@ describe('uiScroll Paddings spec.', () => {
228
228
) ;
229
229
230
230
[ true , false ] . forEach ( outside =>
231
- [ true , false ] . forEach ( userIndicies =>
232
- it ( 'should remove second row' + appendTitle ( outside , userIndicies ) , ( ) =>
231
+ [ true , false ] . forEach ( userIndices =>
232
+ it ( 'should remove second row' + appendTitle ( outside , userIndices ) , ( ) =>
233
233
runTest ( scrollSettings ,
234
234
( viewport , scope ) => {
235
- userIndicies && setUserIndicies ( ) ;
235
+ userIndices && setUserIndices ( ) ;
236
236
237
237
outside && scrollBottom ( viewport , MAX ) ;
238
238
@@ -282,7 +282,7 @@ describe('uiScroll Paddings spec.', () => {
282
282
) ;
283
283
} ) ;
284
284
285
- it ( 'should append 3 rows via index-based applyUpdates when min/max indicies are set' , ( ) => {
285
+ it ( 'should append 3 rows via index-based applyUpdates when min/max indices are set' , ( ) => {
286
286
runTest ( Object . assign ( { } , scrollSettings , { startIndex : 28 } ) ,
287
287
( viewport , scope ) => {
288
288
const newItems = [
@@ -315,11 +315,11 @@ describe('uiScroll Paddings spec.', () => {
315
315
describe ( 'Removing items via indexed-based applyUpdates when neither BOF nor EOF are reached\n' , ( ) => {
316
316
const _scrollSettings = Object . assign ( { } , scrollSettings , { startIndex : 12 } ) ;
317
317
318
- [ true , false ] . forEach ( userIndicies =>
319
- it ( 'should remove first buffered row' + appendTitle ( true , userIndicies ) , ( ) =>
318
+ [ true , false ] . forEach ( userIndices =>
319
+ it ( 'should remove first buffered row' + appendTitle ( true , userIndices ) , ( ) =>
320
320
runTest ( _scrollSettings ,
321
321
( viewport , scope ) => {
322
- userIndicies && setUserIndicies ( ) ;
322
+ userIndices && setUserIndices ( ) ;
323
323
324
324
removeItem ( datasource , 2 ) ;
325
325
scope . adapter . applyUpdates ( 2 , [ ] ) ;
@@ -337,11 +337,11 @@ describe('uiScroll Paddings spec.', () => {
337
337
)
338
338
) ;
339
339
340
- [ true , false ] . forEach ( userIndicies =>
341
- it ( 'should remove last buffered row' + appendTitle ( true , userIndicies ) , ( ) =>
340
+ [ true , false ] . forEach ( userIndices =>
341
+ it ( 'should remove last buffered row' + appendTitle ( true , userIndices ) , ( ) =>
342
342
runTest ( _scrollSettings ,
343
343
( viewport , scope ) => {
344
- userIndicies && setUserIndicies ( ) ;
344
+ userIndices && setUserIndices ( ) ;
345
345
346
346
removeItem ( datasource , 19 ) ;
347
347
scope . adapter . applyUpdates ( 19 , [ ] ) ;
@@ -357,11 +357,11 @@ describe('uiScroll Paddings spec.', () => {
357
357
)
358
358
) ;
359
359
360
- [ true , false ] . forEach ( userIndicies =>
361
- it ( 'should remove absolute first row' + appendTitle ( true , userIndicies ) , ( ) =>
360
+ [ true , false ] . forEach ( userIndices =>
361
+ it ( 'should remove absolute first row' + appendTitle ( true , userIndices ) , ( ) =>
362
362
runTest ( _scrollSettings ,
363
363
( viewport , scope ) => {
364
- userIndicies && setUserIndicies ( ) ;
364
+ userIndices && setUserIndices ( ) ;
365
365
366
366
removeItem ( datasource , 1 ) ;
367
367
scope . adapter . applyUpdates ( 1 , [ ] ) ;
@@ -379,11 +379,11 @@ describe('uiScroll Paddings spec.', () => {
379
379
)
380
380
) ;
381
381
382
- [ true , false ] . forEach ( userIndicies =>
383
- it ( 'should remove absolute last row' + appendTitle ( true , userIndicies ) , ( ) =>
382
+ [ true , false ] . forEach ( userIndices =>
383
+ it ( 'should remove absolute last row' + appendTitle ( true , userIndices ) , ( ) =>
384
384
runTest ( _scrollSettings ,
385
385
( viewport , scope ) => {
386
- userIndicies && setUserIndicies ( ) ;
386
+ userIndices && setUserIndices ( ) ;
387
387
388
388
removeItem ( datasource , itemsCount ) ;
389
389
scope . adapter . applyUpdates ( itemsCount , [ ] ) ;
0 commit comments