(props?: Partial<SelectProps>)
| 43 | |
| 44 | describe('render', () => { |
| 45 | function genSelect(props?: Partial<SelectProps>) { |
| 46 | return ( |
| 47 | <Select |
| 48 | prefixCls="antd" |
| 49 | className="select-test" |
| 50 | value="2" |
| 51 | placeholder="Select a number" |
| 52 | allowClear |
| 53 | showSearch |
| 54 | {...props} |
| 55 | > |
| 56 | <OptGroup label="manager"> |
| 57 | <Option className="option-test" value="jack"> |
| 58 | <b style={{ color: 'red' }}>jack</b> |
| 59 | </Option> |
| 60 | <Option value="lucy">lucy</Option> |
| 61 | </OptGroup> |
| 62 | <OptGroup label="engineer"> |
| 63 | <Option value="yiminghe">yiminghe</Option> |
| 64 | </OptGroup> |
| 65 | </Select> |
| 66 | ); |
| 67 | } |
| 68 | |
| 69 | it('renders correctly', () => { |
| 70 | const { container } = render(genSelect()); |
no outgoing calls
no test coverage detected
searching dependent graphs…