import React from 'react'
import { render } from '@testing-library/react'
import Card from '../index'

describe('Card component snapshots', () => {
  it('should render basic card', () => {
    const { container } = render(
      <Card content={{ type: 'card' }}>
        <div>Card content</div>
      </Card>
    )
    expect(container.firstChild).toMatchSnapshot()
  })

  it('should render card with title', () => {
    const { container } = render(
      <Card content={{ type: 'card', title: 'My title' }}>
        <div>Card content</div>
      </Card>
    )
    expect(container.firstChild).toMatchSnapshot()
  })
})
