@@ -310,20 +310,20 @@ describe('vue-infinite-loading', () => {
310
310
vm . $mount ( '#app' ) ;
311
311
} ) ;
312
312
313
- it ( 'should still works properly with the deprecated property `:on-infinite` but through warning' , ( done ) => {
313
+ it ( 'should still works properly with the deprecated property `:on-infinite` but throw warning' , ( done ) => {
314
314
const originalError = console . warn ;
315
- let isThroughWarn ;
315
+ let isThrowWarn ;
316
316
317
317
console . warn = ( text ) => {
318
318
if ( text . indexOf ( '@infinite' ) > - 1 ) {
319
- isThroughWarn = true ;
319
+ isThrowWarn = true ;
320
320
}
321
321
} ;
322
322
323
323
vm = new Vue ( Object . assign ( { } , basicConfig , {
324
324
methods : {
325
325
onInfinite : function onInfinite ( ) {
326
- expect ( isThroughWarn ) . to . be . true ;
326
+ expect ( isThrowWarn ) . to . be . true ;
327
327
console . warn = originalError ;
328
328
done ( ) ;
329
329
} ,
@@ -407,24 +407,24 @@ describe('vue-infinite-loading', () => {
407
407
vm . $mount ( '#app' ) ;
408
408
} ) ;
409
409
410
- it ( 'should still works properly with the $refs.component.$emit but through warning' , ( done ) => {
410
+ it ( 'should still works properly with the $refs.component.$emit but throw warning' , ( done ) => {
411
411
const originalError = console . warn ;
412
- let throughWarnTimes = 0 ;
412
+ let throwWarnTimes = 0 ;
413
413
414
414
console . warn = ( text ) => {
415
415
if ( text . indexOf ( '$state' ) > - 1 ) {
416
- throughWarnTimes += 1 ;
416
+ throwWarnTimes += 1 ;
417
417
}
418
418
} ;
419
419
420
420
vm = new Vue ( Object . assign ( { } , basicConfig , {
421
421
methods : {
422
422
infiniteHandler : function infiniteHandler ( ) {
423
- if ( ! throughWarnTimes ) {
423
+ if ( ! throwWarnTimes ) {
424
424
this . $refs . infiniteLoading . $emit ( '$InfiniteLoading:loaded' ) ;
425
425
} else {
426
426
this . $refs . infiniteLoading . $emit ( '$InfiniteLoading:complete' ) ;
427
- expect ( throughWarnTimes ) . to . equal ( 2 ) ;
427
+ expect ( throwWarnTimes ) . to . equal ( 2 ) ;
428
428
console . warn = originalError ;
429
429
done ( ) ;
430
430
}
0 commit comments