fix(webapp): warnings in unit tests

This commit is contained in:
Moriz Wahl 2023-05-31 18:05:29 +02:00
parent 3790f3d010
commit 39288b4cb5
2 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,8 @@
import { mount } from '@vue/test-utils'
import InviteButton from './InviteButton.vue'
const localVue = global.localVue
const stubs = {
'v-popover': {
template: '<span><slot /></span>',
@ -26,7 +28,7 @@ describe('InviteButton.vue', () => {
describe('mount', () => {
const Wrapper = () => {
return mount(InviteButton, { mocks, propsData, stubs })
return mount(InviteButton, { mocks, localVue, propsData, stubs })
}
beforeEach(() => {

View File

@ -18,9 +18,13 @@ describe('create.vue', () => {
},
}
const stubs = {
ContributionForm: true,
}
describe('mount', () => {
const Wrapper = () => {
return mount(create, { mocks, localVue })
return mount(create, { mocks, localVue, stubs })
}
beforeEach(() => {
@ -28,7 +32,7 @@ describe('create.vue', () => {
})
it('renders', () => {
expect(wrapper.findAll('.contribution-form')).toHaveLength(1)
expect(wrapper.findComponent({ name: 'ContributionForm' }).exists()).toBe(true)
})
})
})