mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
Use fake timers on the HLC tests
This commit is contained in:
parent
8eae7990dd
commit
45f1221d00
1 changed files with 2 additions and 0 deletions
|
@ -79,6 +79,8 @@ describe('HybridLogicalClock', () => {
|
|||
|
||||
it('should increment nn when local and remote times are equal', () => {
|
||||
const now = Date.now()
|
||||
// mock the clock to be the same time
|
||||
sinon.useFakeTimers(now)
|
||||
clock = new HybridLogicalClock(now, 5, 'local')
|
||||
const result = clock.receive(`${now}:7:remote`)
|
||||
expect(result.walltime).to.be.at.least(now)
|
||||
|
|
Loading…
Reference in a new issue