소스 검색

DatePicker: fix test

qingwei.li 8 년 전
부모
커밋
42168ccb89
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      test/unit/specs/date-picker.spec.js

+ 4 - 1
test/unit/specs/date-picker.spec.js

@@ -411,7 +411,10 @@ describe('DatePicker', () => {
 
         setTimeout(_ => {
           const { minDate, maxDate } = vm.picker;
-          expect(maxDate - minDate).to.equal(2678400000); // one month
+          const minMonth = minDate.getMonth();
+          const maxMonth = maxDate.getMonth();
+
+          expect(maxMonth - minMonth).to.equal(1); // one month
           done();
         }, DELAY);
       }, DELAY);