import React from 'react'
import renderer from 'react-test-renderer'
import Message from '../index'

describe('Message component', () => {
  it('renders default', () => {
    const tree = renderer
      .create(
        <Message
          id={'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'}
          type="alert"
          state="neutral"
        />
      )
      .toJSON()
    expect(tree).toMatchSnapshot()
  })
  it('renders with custom text', () => {
    const tree = renderer
      .create(
        <Message
          id={'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'}
          type="alert"
          state="neutral"
          text="This is a custom message"
        />
      )
      .toJSON()
    expect(tree).toMatchSnapshot()
  })
})
