From c7dbff94865a60d22b9e2966780cb1a2210030bf Mon Sep 17 00:00:00 2001 From: ogerly Date: Thu, 6 Jan 2022 11:11:44 +0100 Subject: [PATCH] add moment jest.fn() --- admin/src/pages/Creation.spec.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/admin/src/pages/Creation.spec.js b/admin/src/pages/Creation.spec.js index 073b22c0e..cad0b9ba3 100644 --- a/admin/src/pages/Creation.spec.js +++ b/admin/src/pages/Creation.spec.js @@ -35,6 +35,16 @@ const mocks = { $toasted: { error: toastErrorMock, }, + $moment: jest.fn(() => { + return { + format: jest.fn((m) => m), + subtract: jest.fn(() => { + return { + format: jest.fn((m) => m), + } + }), + } + }), } describe('Creation', () => {