coverage terms-and-conditions.spec.js

This commit is contained in:
Ulf Gebhardt 2021-04-25 19:53:41 +02:00
parent 427c6f0488
commit 96f84e33f7
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 TermsAndConditions from './terms-and-conditions.vue'
import VueMeta from 'vue-meta'
const localVue = global.localVue
localVue.use(VueMeta, { keyName: 'head' })
describe('terms-and-conditions.vue', () => {
let wrapper
let mocks
beforeEach(() => {
mocks = {
$t: (t) => t,
}
})
describe('mount', () => {
const Wrapper = () => {
return mount(TermsAndConditions, {
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.termsAndConditions')
})
})
})