import React from 'react'; import { mount } from 'enzyme'; import Form from '../../form'; import Input from '..'; import focusTest from '../../../tests/shared/focusTest'; const { TextArea } = Input; describe('Input', () => { focusTest(Input); it('should support maxLength', () => { const wrapper = mount(); expect(wrapper).toMatchSnapshot(); }); it('select()', () => { const wrapper = mount(); wrapper.instance().select(); }); }); focusTest(TextArea); describe('TextArea', () => { beforeAll(() => { jest.useFakeTimers(); }); afterAll(() => { jest.useRealTimers(); }); it('should auto calculate height according to content length', () => { const wrapper = mount(