{"size": 1191, "ext": "js", "max_stars_repo_path": "core/course-sandbox/src/components/ContentElements/AdvancedImage.spec.js", "max_stars_repo_name": "fossabot/salp", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "core/course-sandbox/src/components/ContentElements/AdvancedImage.spec.js", "max_issues_repo_name": "fossabot/salp", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "core/course-sandbox/src/components/ContentElements/AdvancedImage.spec.js", "max_forks_repo_name": "fossabot/salp", "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": 28.3571428571, "max_line_length": 58, "alphanum_fraction": 0.6087321579}
import { expect } from 'chai'
import { mount, createLocalVue } from '@vue/test-utils'
import AdvancedImage from './AdvancedImage.vue'
import SimpleImage from './SimpleImage.vue'
import SimpleText from './SimpleText.vue'
import { Card } from 'element-ui'

const localVue = createLocalVue()
localVue.component(SimpleImage.name, SimpleImage)
localVue.component(SimpleText.name, SimpleText)
localVue.component('Card', Card)

describe('AdvancedImage.vue', () => {
    let wrapper = {}
    const expectedSrc = '$root/__mocks__/images/lorem.jpg'
    const expectedDesc = 'lorem ipsum dollor sit atmet'

    beforeEach(() => {
        wrapper = mount(AdvancedImage, {
            localVue,
            context: {
                props: {
                    src: expectedSrc,
                    description: expectedDesc
                }
            }
        })
    })

    it('should create class "el-card"', () => {
        expect(wrapper).to.contains('.el-card')
    })

    it('should create SimpleImage component', () => {
        expect(wrapper).to.contains(SimpleImage)
    })

    it('should create SimpleText component', () => {
        expect(wrapper).to.contains(SimpleText)
    })
})
