2
0
mirror of https://github.com/tenrok/vue2-datepicker.git synced 2026-06-20 07:20:36 +03:00

feat: default-value supports Array for range (#395)

This commit is contained in:
xiemx
2019-12-16 18:13:08 +08:00
parent c8f7122b63
commit b33c9b8f19
9 changed files with 46 additions and 14 deletions
+11
View File
@@ -33,4 +33,15 @@ describe('TimeRange', () => {
new Date(2019, 9, 4, 19, 30, 0),
]);
});
it('supports defaultValue is Array', () => {
wrapper = mount(TimeRange, {
propsData: {
defaultValue: [new Date(2019, 9, 1, 10), new Date(2019, 11, 1, 12)],
},
});
const actived = wrapper.findAll('.active');
expect(actived.at(0).text()).toBe('10');
expect(actived.at(3).text()).toBe('12');
});
});