mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
fix(webapp): warnings in unit tests
This commit is contained in:
parent
3790f3d010
commit
39288b4cb5
@ -1,6 +1,8 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import InviteButton from './InviteButton.vue'
|
import InviteButton from './InviteButton.vue'
|
||||||
|
|
||||||
|
const localVue = global.localVue
|
||||||
|
|
||||||
const stubs = {
|
const stubs = {
|
||||||
'v-popover': {
|
'v-popover': {
|
||||||
template: '<span><slot /></span>',
|
template: '<span><slot /></span>',
|
||||||
@ -26,7 +28,7 @@ describe('InviteButton.vue', () => {
|
|||||||
|
|
||||||
describe('mount', () => {
|
describe('mount', () => {
|
||||||
const Wrapper = () => {
|
const Wrapper = () => {
|
||||||
return mount(InviteButton, { mocks, propsData, stubs })
|
return mount(InviteButton, { mocks, localVue, propsData, stubs })
|
||||||
}
|
}
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
|||||||
@ -18,9 +18,13 @@ describe('create.vue', () => {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const stubs = {
|
||||||
|
ContributionForm: true,
|
||||||
|
}
|
||||||
|
|
||||||
describe('mount', () => {
|
describe('mount', () => {
|
||||||
const Wrapper = () => {
|
const Wrapper = () => {
|
||||||
return mount(create, { mocks, localVue })
|
return mount(create, { mocks, localVue, stubs })
|
||||||
}
|
}
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
@ -28,7 +32,7 @@ describe('create.vue', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('renders', () => {
|
it('renders', () => {
|
||||||
expect(wrapper.findAll('.contribution-form')).toHaveLength(1)
|
expect(wrapper.findComponent({ name: 'ContributionForm' }).exists()).toBe(true)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user