components#Dot TypeScript Examples

The following examples show how to use components#Dot. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.test.tsx    From geist-ui with MIT License 6 votes vote down vote up
describe('Dot', () => {
  it('should render correctly', () => {
    const wrapper = mount(<Dot />)
    expect(wrapper).toMatchSnapshot()
    expect(() => wrapper.unmount()).not.toThrow()
  })

  it('should supports types', () => {
    const wrapper = render(
      <div>
        <Dot type="success" />
        <Dot type="secondary" />
        <Dot type="warning" />
        <Dot type="error" />
      </div>,
    )
    expect(wrapper).toMatchSnapshot()
  })

  it('should be render text', () => {
    const wrapper = mount(<Dot>test</Dot>)
    expect(wrapper.text()).toContain('test')
  })
})