{"size": 839, "ext": "js", "max_stars_repo_path": "example/tests/unit/contentTestimonial.spec.js", "max_stars_repo_name": "getnacelle/nacelle-rise-nuxt-module", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "example/tests/unit/contentTestimonial.spec.js", "max_issues_repo_name": "getnacelle/nacelle-rise-nuxt-module", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "example/tests/unit/contentTestimonial.spec.js", "max_forks_repo_name": "getnacelle/nacelle-rise-nuxt-module", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 27.9666666667, "max_line_length": 72, "alphanum_fraction": 0.6197854589}
import { shallowMount } from '@vue/test-utils'
import ContentTestimonial from '@/components/nacelle/ContentTestimonial'

describe('ContentTestimonial.vue', () => {
  it('renders a testimonial', async () => {
    const wrapper = shallowMount(ContentTestimonial, {
      propsData: {
        name: 'user',
        quote: 'lorem ipsum...'
      }
    })

    expect(wrapper.find('blockquote').exists()).toBe(true)
    expect(wrapper.classes()).toContain('testimonial')
    expect(wrapper.find('figure').exists()).toBe(false)
  })

  it('renders image if image prop set', async () => {
    const wrapper = shallowMount(ContentTestimonial, {
      propsData: {
        name: 'user',
        quote: 'lorem ipsum...',
        imageUrl: 'https://placehold.it/400x400'
      }
    })

    expect(wrapper.find('figure').exists()).toBe(true)
  })
})
