diff --git a/e2e/test/e2e-json-rpc.test.ts b/e2e/test/e2e-json-rpc.test.ts index 9edfa4c25..6ff05097a 100644 --- a/e2e/test/e2e-json-rpc.test.ts +++ b/e2e/test/e2e-json-rpc.test.ts @@ -99,8 +99,10 @@ describe("JSON-RPC", () => { it("Should reset the changes when sending 0", async () => { await send("evm_setNextBlockTimestamp", [0]); + let mined_timestamp = Math.floor(Date.now() / 1000); await send("evm_mine", []); - expect((await latest()).timestamp).approximately(Math.floor(Date.now() / 1000), 1); + let latest_timestamp = (await latest()).timestamp; + expect(latest_timestamp).gte(mined_timestamp).lte(Math.floor(Date.now() / 1000)); }) it("Should handle negative offsets", async () => {