mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
39 lines
682 B
JavaScript
39 lines
682 B
JavaScript
import { mount } from '@vue/test-utils'
|
|
import Faq from './faq.vue'
|
|
import VueMeta from 'vue-meta'
|
|
|
|
const localVue = global.localVue
|
|
localVue.use(VueMeta, { keyName: 'head' })
|
|
|
|
describe('faq.vue', () => {
|
|
let wrapper
|
|
let mocks
|
|
|
|
beforeEach(() => {
|
|
mocks = {
|
|
$t: (t) => t,
|
|
}
|
|
})
|
|
|
|
describe('mount', () => {
|
|
const Wrapper = () => {
|
|
return mount(Faq, {
|
|
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.faq')
|
|
})
|
|
})
|
|
})
|