/* eslint-disable react/prefer-stateless-function */ import React from 'react'; import { mount } from 'enzyme'; import Form from '..'; import mountTest from '../../../tests/shared/mountTest'; describe('Form', () => { mountTest(Form); mountTest(Form.Item); it('hideRequiredMark', () => { const wrapper = mount(
); expect(wrapper.find('form').hasClass('ant-form-hide-required-mark')).toBe(true); }); describe('wrappedComponentRef', () => { it('warns on functional component', () => { if (process.env.REACT === '15') { return; } const spy = jest.spyOn(console, 'error').mockImplementation(() => {}); const TestForm = () => ; const Wrapped = Form.create()(TestForm); mount(