mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
coverage default.spec.js
This commit is contained in:
parent
f97e911626
commit
37c04849dd
45
webapp/layouts/default.spec.js
Normal file
45
webapp/layouts/default.spec.js
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
import Vuex from 'vuex'
|
||||||
|
import { config, shallowMount } from '@vue/test-utils'
|
||||||
|
import Default from './default.vue'
|
||||||
|
|
||||||
|
const localVue = global.localVue
|
||||||
|
|
||||||
|
config.stubs['nuxt'] = '<span><slot /></span>'
|
||||||
|
config.stubs['client-only'] = '<span><slot /></span>'
|
||||||
|
config.stubs['nuxt-link'] = '<span><slot /></span>'
|
||||||
|
|
||||||
|
describe('default.vue', () => {
|
||||||
|
let wrapper
|
||||||
|
let mocks
|
||||||
|
let store
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
mocks = {
|
||||||
|
$t: jest.fn(),
|
||||||
|
$env: {
|
||||||
|
INVITE_REGISTRATION: true
|
||||||
|
},
|
||||||
|
}
|
||||||
|
store = new Vuex.Store({
|
||||||
|
getters: {},
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('shallow mount', () => {
|
||||||
|
const Wrapper = () => {
|
||||||
|
return shallowMount(Default, {
|
||||||
|
store,
|
||||||
|
mocks,
|
||||||
|
localVue,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
wrapper = Wrapper()
|
||||||
|
})
|
||||||
|
|
||||||
|
it('renders', () => {
|
||||||
|
expect(wrapper.is('.layout-default')).toBe(true)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
Loading…
x
Reference in New Issue
Block a user