fix test CreationFormular

This commit is contained in:
Moriz Wahl 2021-11-19 15:51:29 +01:00
parent d8dfec9e7f
commit 9c02869ea0

View File

@ -3,13 +3,31 @@ import CreationFormular from './CreationFormular.vue'
const localVue = global.localVue
const mocks = { $moment: jest.fn() }
const mocks = {
$moment: jest.fn(() => {
return {
format: jest.fn((m) => m),
subtract: jest.fn(() => {
return {
format: jest.fn((m) => m),
}
}),
}
}),
}
const propsData = {
type: '',
item: {},
creation: {},
itemsMassCreation: {},
}
describe('CreationFormular', () => {
let wrapper
const Wrapper = () => {
return mount(CreationFormular, { localVue, mocks })
return mount(CreationFormular, { localVue, mocks, propsData })
}
describe('mount', () => {