From 9c02869ea0901df94836706e3ac4c78b75425648 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Fri, 19 Nov 2021 15:51:29 +0100 Subject: [PATCH] fix test CreationFormular --- admin/src/components/CreationFormular.spec.js | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/admin/src/components/CreationFormular.spec.js b/admin/src/components/CreationFormular.spec.js index 9f4fc3f1b..f218cf8e2 100644 --- a/admin/src/components/CreationFormular.spec.js +++ b/admin/src/components/CreationFormular.spec.js @@ -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', () => {