Skip to content

Commit ec2580f

Browse files
committed
Fix the text error for all test cases
1 parent 07d8307 commit ec2580f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

test/unit/specs/InfiniteLoading.spec.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -310,20 +310,20 @@ describe('vue-infinite-loading', () => {
310310
vm.$mount('#app');
311311
});
312312

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) => {
314314
const originalError = console.warn;
315-
let isThroughWarn;
315+
let isThrowWarn;
316316

317317
console.warn = (text) => {
318318
if (text.indexOf('@infinite') > -1) {
319-
isThroughWarn = true;
319+
isThrowWarn = true;
320320
}
321321
};
322322

323323
vm = new Vue(Object.assign({}, basicConfig, {
324324
methods: {
325325
onInfinite: function onInfinite() {
326-
expect(isThroughWarn).to.be.true;
326+
expect(isThrowWarn).to.be.true;
327327
console.warn = originalError;
328328
done();
329329
},
@@ -407,24 +407,24 @@ describe('vue-infinite-loading', () => {
407407
vm.$mount('#app');
408408
});
409409

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) => {
411411
const originalError = console.warn;
412-
let throughWarnTimes = 0;
412+
let throwWarnTimes = 0;
413413

414414
console.warn = (text) => {
415415
if (text.indexOf('$state') > -1) {
416-
throughWarnTimes += 1;
416+
throwWarnTimes += 1;
417417
}
418418
};
419419

420420
vm = new Vue(Object.assign({}, basicConfig, {
421421
methods: {
422422
infiniteHandler: function infiniteHandler() {
423-
if (!throughWarnTimes) {
423+
if (!throwWarnTimes) {
424424
this.$refs.infiniteLoading.$emit('$InfiniteLoading:loaded');
425425
} else {
426426
this.$refs.infiniteLoading.$emit('$InfiniteLoading:complete');
427-
expect(throughWarnTimes).to.equal(2);
427+
expect(throwWarnTimes).to.equal(2);
428428
console.warn = originalError;
429429
done();
430430
}

0 commit comments

Comments
 (0)