import React from 'react'
import renderer from 'react-test-renderer'
import { Notification, NotificationBar, NotificationBarProvider } from '..'

describe('packages/ui/NotificationBar', () => {
  it('renders a basic Notification', () => {
    const tree = renderer
      .create(
        <Notification
          duration={2000}
          notification="foo"
          setNotification={() => {}}
        />
      )
      .toJSON()
    expect(tree).toMatchSnapshot()
  })
  it('renders a basic NotificationBar', () => {
    const tree = renderer.create(<NotificationBar />).toJSON()
    expect(tree).toMatchSnapshot()
  })
  it('renders a basic NotificationBarProvider', () => {
    const tree = renderer
      .create(
        <NotificationBarProvider>
          <NotificationBar />
          <div>Test</div>
        </NotificationBarProvider>
      )
      .toJSON()
    expect(tree).toMatchSnapshot()
  })
})
