From 975514ffb95ff91ed2a2aa8601311e6444a6b4a5 Mon Sep 17 00:00:00 2001 From: Arcadio Quintero Date: Thu, 19 Dec 2024 11:20:50 -0500 Subject: [PATCH] feat(sdk-analytics) fix date test --- .../dotAnalytics/shared/dot-content-analytics.utils.spec.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core-web/libs/sdk/analytics/src/lib/dotAnalytics/shared/dot-content-analytics.utils.spec.ts b/core-web/libs/sdk/analytics/src/lib/dotAnalytics/shared/dot-content-analytics.utils.spec.ts index caf813a21e4..e659057bff3 100644 --- a/core-web/libs/sdk/analytics/src/lib/dotAnalytics/shared/dot-content-analytics.utils.spec.ts +++ b/core-web/libs/sdk/analytics/src/lib/dotAnalytics/shared/dot-content-analytics.utils.spec.ts @@ -13,6 +13,11 @@ import { describe('Analytics Utils', () => { let mockLocation: Location; + beforeAll(() => { + jest.useFakeTimers({ doNotFake: [] }); + jest.setSystemTime(new Date('2024-01-01T00:00:00Z')); + }); + beforeEach(() => { // Mock Location object mockLocation = {