{"size": 900, "ext": "js", "max_stars_repo_path": "packages/app/src/components/AppNotifications.spec.js", "max_stars_repo_name": "KittyGiraudel/happy-plants", "max_stars_repo_stars_event_min_datetime": "2017-08-14T17:15:22.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-29T22:03:09.000Z", "max_issues_repo_path": "packages/app/src/components/AppNotifications.spec.js", "max_issues_repo_name": "KittyGiraudel/happy-plants", "max_issues_repo_issues_event_min_datetime": "2017-07-09T08:26:23.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-27T21:28:54.000Z", "max_forks_repo_path": "packages/app/src/components/AppNotifications.spec.js", "max_forks_repo_name": "matthijsthoolen/happy-plants", "max_forks_repo_forks_event_min_datetime": "2017-08-12T11:33:19.000Z", "max_forks_repo_forks_event_max_datetime": "2022-01-05T19:03:05.000Z"}
{"max_stars_count": 210, "max_issues_count": 58, "max_forks_count": 37, "avg_line_length": 34.6153846154, "max_line_length": 86, "alphanum_fraction": 0.6855555556}
import { shallowMount } from '@vue/test-utils'
import AppNotifications from '@/components/AppNotifications'

describe('components/AppNotifications.vue', () => {
  it('is a Vue component', () => {
    const wrapper = shallowMount(AppNotifications)
    expect(wrapper.isVueInstance()).toEqual(true)
  })

  it('has correct default props data', () => {
    const wrapper = shallowMount(AppNotifications)
    expect(wrapper.props().message).toEqual(false)
  })

  it('is an empty element when no message is given', () => {
    const wrapper = shallowMount(AppNotifications)
    expect(wrapper.isEmpty()).toEqual(true)
  })

  it('renders wrapper and message when message prop is given', () => {
    const wrapper = shallowMount(AppNotifications, { propsData: { message: 'Foo!' } })
    expect(wrapper.classes()).toContain('notification-wrapper')
    expect(wrapper.text().trim()).toEqual('Foo!')
  })
})
