From 47b41cf1931f231d6523b3177f8d1ffd1fc70575 Mon Sep 17 00:00:00 2001 From: Nicolas AUGER Date: Thu, 27 Feb 2020 11:35:26 +0100 Subject: [PATCH] tests(date-field): increase tests coverage --- tests/DateField.test.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/DateField.test.js b/tests/DateField.test.js index 77db41ab6..d073ed661 100644 --- a/tests/DateField.test.js +++ b/tests/DateField.test.js @@ -200,6 +200,22 @@ describe('', () => { expect(value.getMonth()).toBe(11); expect(value.getDate()).toBe(17); }); + + it('should add formated "min" and "max" prop to native date input', () => { + const day = new Date('December 16, 2019'); + const nextDay = new Date('December 17, 2019'); + const component = mount( + + ); + + const field = component.find('input[type="date"]'); + expect(field.prop('min')).toBe('2019-12-16'); + expect(field.prop('max')).toBe('2019-12-17'); }); });