diff --git a/packages/web-app-files/tests/unit/views/spaces/Project.spec.js b/packages/web-app-files/tests/unit/views/spaces/Project.spec.js index 5eb668d6147..a028b6b5d9c 100644 --- a/packages/web-app-files/tests/unit/views/spaces/Project.spec.js +++ b/packages/web-app-files/tests/unit/views/spaces/Project.spec.js @@ -13,7 +13,6 @@ localVue.use(GetTextPlugin, { silent: true }) -beforeEach(mockAxios.reset) const composables = '@files/src/composables/index' jest.mock(composables, () => ({ @@ -27,8 +26,16 @@ jest.mock(composables, () => ({ }) })) +beforeEach(mockAxios.reset) + +beforeEach(() => { + jest.useFakeTimers('modern') + jest.setSystemTime(new Date(2020, 3, 1)) +}) + afterEach(() => { jest.unmock(composables) + jest.useRealTimers() }) window.ResizeObserver = diff --git a/packages/web-app-files/tests/unit/views/spaces/__snapshots__/Project.spec.js.snap b/packages/web-app-files/tests/unit/views/spaces/__snapshots__/Project.spec.js.snap index 5c9517a1f9d..0b590d817a3 100644 --- a/packages/web-app-files/tests/unit/views/spaces/__snapshots__/Project.spec.js.snap +++ b/packages/web-app-files/tests/unit/views/spaces/__snapshots__/Project.spec.js.snap @@ -48,7 +48,7 @@ exports[`Spaces project component resources should show resources if given 1`] =