From 7dd0d96be3235d4b16f73c41f61e5587b1c02105 Mon Sep 17 00:00:00 2001 From: Zixuan Chen Date: Sun, 25 Feb 2024 12:02:58 +0800 Subject: [PATCH] test: make timestamp test less restrict (#273) --- loro-js/tests/basic.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/loro-js/tests/basic.test.ts b/loro-js/tests/basic.test.ts index b2e409cb..3299fd1b 100644 --- a/loro-js/tests/basic.test.ts +++ b/loro-js/tests/basic.test.ts @@ -1,10 +1,10 @@ import { describe, expect, expectTypeOf, it } from "vitest"; import { + getType, + isContainer, Loro, LoroList, LoroMap, - isContainer, - getType, VersionVector, } from "../src"; import { Container } from "../dist/loro"; @@ -340,7 +340,7 @@ it("enable timestamp", () => { doc.commit(); { const c = doc.getChangeAt({ peer: "1", counter: 4 }); - expect(c.timestamp).toBeCloseTo(Date.now(), 0); + expect(c.timestamp).toBeCloseTo(Date.now(), -1); } });