From af2ea3e809ac8563899bd309822ab12b4befb73b Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Thu, 20 Jan 2022 13:26:31 +0100 Subject: [PATCH] fix tests --- admin/src/components/CreationFormular.spec.js | 11 +---------- admin/src/components/UserTable.spec.js | 1 + 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/admin/src/components/CreationFormular.spec.js b/admin/src/components/CreationFormular.spec.js index 5b0ac09f5..004cf4474 100644 --- a/admin/src/components/CreationFormular.spec.js +++ b/admin/src/components/CreationFormular.spec.js @@ -22,16 +22,7 @@ const toastedSuccessMock = jest.fn() const mocks = { $t: jest.fn((t) => t), - $moment: jest.fn(() => { - return { - format: jest.fn((m) => m), - subtract: jest.fn(() => { - return { - format: jest.fn((m) => m), - } - }), - } - }), + $d: jest.fn((d) => d), $apollo: { query: apolloMock, mutate: apolloMutateMock, diff --git a/admin/src/components/UserTable.spec.js b/admin/src/components/UserTable.spec.js index e26a548cc..01105931c 100644 --- a/admin/src/components/UserTable.spec.js +++ b/admin/src/components/UserTable.spec.js @@ -107,6 +107,7 @@ describe('UserTable', () => { const mocks = { $t: jest.fn((t) => t), + $d: jest.fn((d) => d), $moment: jest.fn(() => { return { format: jest.fn((m) => m),