mirror of
https://github.com/loro-dev/loro.git
synced 2025-01-23 05:24:51 +00:00
test: make timestamp test less restrict (#273)
This commit is contained in:
parent
403eb18fa5
commit
7dd0d96be3
1 changed files with 3 additions and 3 deletions
|
@ -1,10 +1,10 @@
|
||||||
import { describe, expect, expectTypeOf, it } from "vitest";
|
import { describe, expect, expectTypeOf, it } from "vitest";
|
||||||
import {
|
import {
|
||||||
|
getType,
|
||||||
|
isContainer,
|
||||||
Loro,
|
Loro,
|
||||||
LoroList,
|
LoroList,
|
||||||
LoroMap,
|
LoroMap,
|
||||||
isContainer,
|
|
||||||
getType,
|
|
||||||
VersionVector,
|
VersionVector,
|
||||||
} from "../src";
|
} from "../src";
|
||||||
import { Container } from "../dist/loro";
|
import { Container } from "../dist/loro";
|
||||||
|
@ -340,7 +340,7 @@ it("enable timestamp", () => {
|
||||||
doc.commit();
|
doc.commit();
|
||||||
{
|
{
|
||||||
const c = doc.getChangeAt({ peer: "1", counter: 4 });
|
const c = doc.getChangeAt({ peer: "1", counter: 4 });
|
||||||
expect(c.timestamp).toBeCloseTo(Date.now(), 0);
|
expect(c.timestamp).toBeCloseTo(Date.now(), -1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue