mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
add spec for groups
This commit is contained in:
parent
b183485237
commit
1cc663ed34
35
webapp/pages/groups.spec.js
Normal file
35
webapp/pages/groups.spec.js
Normal file
@ -0,0 +1,35 @@
|
||||
import { config, mount } from '@vue/test-utils'
|
||||
import groups from './groups.vue'
|
||||
|
||||
const localVue = global.localVue
|
||||
|
||||
config.stubs['nuxt-link'] = '<span class="nuxt-link"><slot /></span>'
|
||||
config.stubs['client-only'] = '<span class="client-only"><slot /></span>'
|
||||
|
||||
describe('groups', () => {
|
||||
let wrapper
|
||||
let mocks
|
||||
|
||||
beforeEach(() => {
|
||||
mocks = {
|
||||
$t: jest.fn(),
|
||||
}
|
||||
})
|
||||
|
||||
describe('mount', () => {
|
||||
const Wrapper = () => {
|
||||
return mount(groups, {
|
||||
mocks,
|
||||
localVue,
|
||||
})
|
||||
}
|
||||
|
||||
beforeEach(() => {
|
||||
wrapper = Wrapper()
|
||||
})
|
||||
|
||||
it('renders', () => {
|
||||
expect(wrapper.is('div')).toBe(true)
|
||||
})
|
||||
})
|
||||
})
|
||||
@ -67,7 +67,7 @@ const tabToFilterMapping = (tab) => {
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'MyGroups',
|
||||
name: 'Groups',
|
||||
components: {
|
||||
GroupList,
|
||||
TabNavigation,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user