From 5c63d2c5bc9507d43b9377ac84ce9ba7d59b37c8 Mon Sep 17 00:00:00 2001 From: Sandeep Digumarty Date: Tue, 21 Nov 2023 15:50:09 +0530 Subject: [PATCH] chore: add date mock to fix timestamp validation in tests (#2844) chore: add date mock to fix timestamp validation --- test/__tests__/facebook_conversions.test.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/__tests__/facebook_conversions.test.js b/test/__tests__/facebook_conversions.test.js index a450952efe..9495a85913 100644 --- a/test/__tests__/facebook_conversions.test.js +++ b/test/__tests__/facebook_conversions.test.js @@ -23,6 +23,8 @@ const outputRouterDataFile = fs.readFileSync( const inputRouterData = JSON.parse(inputRouterDataFile); const expectedRouterData = JSON.parse(outputRouterDataFile); +Date.now = jest.fn(() => new Date("2023-11-12T15:46:51.000Z")); // 2023-11-12T15:46:51.693229+05:30 + describe(`${name} Tests`, () => { describe("Processor", () => { testData.forEach((dataPoint, index) => {