From 42168ccb897b9375dbca84790d8745d84f206850 Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Tue, 1 Nov 2016 10:35:05 +0800 Subject: [PATCH] DatePicker: fix test --- test/unit/specs/date-picker.spec.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/unit/specs/date-picker.spec.js b/test/unit/specs/date-picker.spec.js index 3006a15b6..38135ca8c 100644 --- a/test/unit/specs/date-picker.spec.js +++ b/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);