diff --git a/components/form/__tests__/index.test.js b/components/form/__tests__/index.test.js index c33e6de449..6acc500733 100644 --- a/components/form/__tests__/index.test.js +++ b/components/form/__tests__/index.test.js @@ -1,5 +1,5 @@ import React from 'react'; -import { shallow } from 'enzyme'; +import { shallow, mount } from 'enzyme'; import Form from '..'; describe('Form', () => { @@ -9,4 +9,28 @@ describe('Form', () => { ); expect(wrapper.hasClass('ant-form-hide-required-mark')).toBe(true); }); + + describe('wrappedComponentRef', () => { + it('warns on functional component', () => { + const spy = jest.spyOn(console, 'error').mockImplementation(() => {}); + const TestForm = () =>
; + const Wrapped = Form.create()(TestForm); + mount(