message: test: finish switch
diff: @@ -23,10 +23,27 @@ describe('Switch', () => {
  })
  it('onchange', () => {
  const onChange = jest.fn()
  - const wrapper = mount(
  - <Switch onChange={onChange} />
  - )
  + const wrapper = mount(<Switch onChange={onChange} />)
  wrapper.find('.hi-switch').simulate('click')
  expect(onChange).toBeCalled()
  + wrapper.setProps({ checked: true })
  + expect(onChange).toHaveBeenCalledTimes(2)
  + wrapper.setProps({ uselessProps: true })
  + expect(onChange).toHaveBeenCalledTimes(2)
  + })
  +
  + it('should stop when click return false', () => {
  + const onChange = jest.fn()
  + const onClick = jest.fn(state => false)
  + const wrapper = mount(<Switch onChange={onChange} onClick={onClick} />)
  + wrapper.find('.hi-switch').simulate('click')
  + expect(onChange).not.toBeCalled()
  + })
  +
  + it('should be disabled', () => {
  + const onChange = jest.fn()
  + const wrapper = mount(<Switch onChange={onChange} disabled />)
  + wrapper.find('.hi-switch').simulate('click')
  + expect(onChange).not.toBeCalled()
  })
  })
  