From a39debf926e503c25ff0bb0ffc3bafbc009c7299 Mon Sep 17 00:00:00 2001 From: Chaitanya Potti Date: Mon, 21 Oct 2024 12:21:28 +0800 Subject: [PATCH] only fake the date class instead of all sub timers like next tick --- test/testnet.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/testnet.test.ts b/test/testnet.test.ts index 5633c2f..51da5b4 100644 --- a/test/testnet.test.ts +++ b/test/testnet.test.ts @@ -287,7 +287,7 @@ describe("torus utils migrated testnet on sapphire", function () { }); it("should pass at get pub nonce when system time is incorrect", async function () { - const clock = useFakeTimers(); + const clock = useFakeTimers({ toFake: ["Date"] }); const fakeTime = new Date("2023-05-05T12:00:00").getTime(); // Mock the system clock time to be a specific time