UNPKG

@alicd/crui-form-item

Version:

@alicd/next 中 Form.Item 组件能力的扩展,增加了错误的提示方式 showValidateType ,其他能力和 Form.Item 保持一致,必须放置在 Form 元素中

20 lines (14 loc) 487 B
/** * 测试文件目录结构和 src 保持一致,文件名加 test 后缀 */ import React from 'react'; import renderer from 'react-test-renderer'; import CustomComponent from '../src/index.jsx'; // 测试 UI 参考: https://facebook.github.io/jest/docs/en/tutorial-react.html#content test('测试 React App', () => { const component = renderer.create( <CustomComponent text="Hello world" /> ); let tree = component.toJSON(); expect(tree).toMatchSnapshot(); });