Skip to content

Commit 68620d1

Browse files
committed
Modify unit test to adapto new event logic
1 parent 79f470c commit 68620d1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/unit/specs/InfiniteLoading.spec.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ describe('InfiniteLoading.vue', () => {
104104

105105
it('should display no results prompt', (done) => {
106106
vm.onInfinite = function test() {
107-
this.$broadcast('$InfiniteLoading:noResults');
107+
this.$broadcast('$InfiniteLoading:complete');
108108
Vue.nextTick(() => {
109109
expect(isShow(vm.$el.querySelectorAll('.infinite-status-prompt')[0])).to.be.true;
110110
done();
@@ -116,7 +116,8 @@ describe('InfiniteLoading.vue', () => {
116116

117117
it('should display no more data prompt', (done) => {
118118
vm.onInfinite = function test() {
119-
this.$broadcast('$InfiniteLoading:noMore');
119+
this.$broadcast('$InfiniteLoading:loaded');
120+
this.$broadcast('$InfiniteLoading:complete');
120121
Vue.nextTick(() => {
121122
expect(isShow(vm.$el.querySelectorAll('.infinite-status-prompt')[1])).to.be.true;
122123
done();

0 commit comments

Comments
 (0)