Skip to content

Commit 3a3860c

Browse files
committed
Modify unit test to adapto to the new way that calculate distance
1 parent 4a96bd4 commit 3a3860c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/unit/specs/InfiniteLoading.spec.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,15 @@ describe('InfiniteLoading.vue', () => {
212212
vm.$mount('#app');
213213
});
214214

215-
it('should display the custom spinner if customize it with slot', () => {
215+
it('should display the custom spinner if customize it with slot', (done) => {
216216
vm.isCustomSpinner = true;
217217
delete vm.distance;
218218
vm.$mount('#app');
219219

220-
expect(vm.$el.querySelector('.custom-spinner')).to.be.ok;
220+
Vue.nextTick(() => {
221+
expect(vm.$el.querySelector('.custom-spinner')).to.be.ok;
222+
done();
223+
});
221224
});
222225

223226
it('should load data when scroll top (direction attribute)', (done) => {

0 commit comments

Comments
 (0)