Skip to content

Commit e99d4ba

Browse files
committed
Modify unit test to adapto to the new way that calculate distance
1 parent c466d76 commit e99d4ba

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
@@ -178,13 +178,16 @@ describe('InfiniteLoading.vue', () => {
178178
vm.$mount().$appendTo('body');
179179
});
180180

181-
it('should display the custom spinner if customize it with slot', () => {
181+
it('should display the custom spinner if customize it with slot', (done) => {
182182
vm.isCustomSpinner = true;
183183
vm.distance = undefined;
184184

185185
vm.$mount().$appendTo('body');
186186

187-
expect(vm.$el.querySelector('.custom-spinner')).to.be.ok;
187+
Vue.nextTick(() => {
188+
expect(vm.$el.querySelector('.custom-spinner')).to.be.ok;
189+
done();
190+
});
188191
});
189192

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

0 commit comments

Comments
 (0)