Browse Source

add unit test

Pan 8 năm trước cách đây
mục cha
commit
e204e28320
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      test/unit/specs/slider.spec.js

+ 2 - 2
test/unit/specs/slider.spec.js

@@ -77,7 +77,7 @@ describe('Slider', () => {
       }
     }, true);
     const slider = vm.$children[0].$children[0];
-    slider.onButtonDown({ clientX: 0 });
+    slider.onButtonDown({ clientX: 0, preventDefault() {} });
     slider.onDragging({ clientX: 100 });
     slider.onDragEnd();
     setTimeout(() => {
@@ -101,7 +101,7 @@ describe('Slider', () => {
       }
     }, true);
     const slider = vm.$children[0].$children[0];
-    slider.onButtonDown({ clientX: 0 });
+    slider.onButtonDown({ clientX: 0, preventDefault() {} });
     slider.onDragging({ clientX: 100 });
     slider.onDragEnd();
     setTimeout(() => {