message: Add tests to transformTwoYearDigit option.
diff: @@ -59,6 +59,60 @@ it('should allow placeholder customization via locale context', () => {
  expect(container.querySelector('input').getAttribute('placeholder')).toEqual(ptBr.dateInput.placeholder)
  })
  +describe('transform two year digit option', () => {
  + it('should do nothing when it is true, the values is right but user press esc', () => {
  + const change = jest.fn()
  + const { container } = render(<DateInput onChange={change} transformTwoYearDigit />)
  + const input = container.querySelector('input')
  +
  + fireEvent.change(input, { target: { value: '06/04/12' } })
  + fireEvent.keyDown(input, { keyCode: 27, key: 'Escape' })
  + expect(change).not.toHaveBeenLastCalledWith()
  + })
  +
  + it('should transform the start of the year to 20 when the year with two digits is equal the current year', () => {
  + const change = jest.fn()
  + const { container } = render(<DateInput onChange={change} transformTwoYearDigit />)
  + const input = container.querySelector('input')
  + const currentYearTwoDigits: string = new Date().getFullYear().toString().substr(2, 2)
  +
  + fireEvent.change(input, { target: { value: `06/04/${currentYearTwoDigits}` } })
  + fireEvent.keyDown(input, { keyCode: 9, key: 'Tab' })
  + expect(change).toHaveBeenLastCalledWith(new Date(`20${currentYearTwoDigits}-04-06`))
  + })
  +
  + it('should transform the start of the year to 19 when the year with two digits is greater than the current year', () => {
  + const change = jest.fn()
  + const { container } = render(<DateInput onChange={change} transformTwoYearDigit />)
  + const input = container.querySelector('input')
  + const currentYearTwoDigitsPlusOne: string = (new Date().getFullYear() + 1).toString().substr(2, 2)
  +
  + fireEvent.change(input, { target: { value: `06/04/${currentYearTwoDigitsPlusOne}` } })
  + fireEvent.keyDown(input, { keyCode: 9, key: 'Tab' })
  + expect(change).toHaveBeenLastCalledWith(new Date(`19${currentYearTwoDigitsPlusOne}-04-06`))
  + })
  +
  + it('should do nothing when it is true but the year only have one digit', () => {
  + const change = jest.fn()
  + const { container } = render(<DateInput onChange={change} transformTwoYearDigit />)
  + const input = container.querySelector('input')
  +
  + fireEvent.change(input, { target: { value: '06/04/1' } })
  + fireEvent.keyDown(input, { keyCode: 9, key: 'Tab' })
  + expect(change).not.toHaveBeenLastCalledWith()
  + })
  +
  + it('should do nothing when it is false', () => {
  + const change = jest.fn()
  + const { container } = render(<DateInput onChange={change} />)
  + const input = container.querySelector('input')
  +
  + fireEvent.change(input, { target: { value: '06/04/12' } })
  + fireEvent.keyDown(input, { keyCode: 9, key: 'Tab' })
  + expect(change).not.toHaveBeenLastCalledWith()
  + })
  +})
  +
  describe('clear', () => {
  it('should clear the input value', () => {
  const change = jest.fn()
  