mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
43 lines
750 B
JavaScript
43 lines
750 B
JavaScript
import { mount } from '@vue/test-utils'
|
|
import GroupContentMenu from './GroupContentMenu.vue'
|
|
|
|
const localVue = global.localVue
|
|
|
|
const stubs = {
|
|
'router-link': {
|
|
template: '<span><slot /></span>',
|
|
},
|
|
}
|
|
|
|
const propsData = {
|
|
usage: 'groupTeaser',
|
|
resource: {},
|
|
group: {},
|
|
resourceType: 'group',
|
|
}
|
|
|
|
describe('GroupContentMenu', () => {
|
|
let wrapper
|
|
let mocks
|
|
|
|
beforeEach(() => {
|
|
mocks = {
|
|
$t: jest.fn(),
|
|
}
|
|
})
|
|
|
|
describe('mount', () => {
|
|
const Wrapper = () => {
|
|
return mount(GroupContentMenu, { propsData, mocks, localVue, stubs })
|
|
}
|
|
|
|
beforeEach(() => {
|
|
wrapper = Wrapper()
|
|
})
|
|
|
|
it('renders', () => {
|
|
expect(wrapper.findAll('.group-content-menu')).toHaveLength(1)
|
|
})
|
|
})
|
|
})
|