coverage imprint.spec.js

This commit is contained in:
Ulf Gebhardt 2021-04-25 19:52:36 +02:00
parent e397f131f7
commit 45f7ece248
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD

View File

@ -0,0 +1,38 @@
import { mount } from '@vue/test-utils'
import Imprint from './imprint.vue'
import VueMeta from 'vue-meta'
const localVue = global.localVue
localVue.use(VueMeta, { keyName: 'head' })
describe('imprint.vue', () => {
let wrapper
let mocks
beforeEach(() => {
mocks = {
$t: (t) => t,
}
})
describe('mount', () => {
const Wrapper = () => {
return mount(Imprint, {
mocks,
localVue,
})
}
beforeEach(() => {
wrapper = Wrapper()
})
it('renders', () => {
expect(wrapper.is('div')).toBe(true)
})
it('has correct <head> content', () => {
expect(wrapper.vm.$metaInfo.title).toBe('site.imprint')
})
})
})