test: fix sleep() test, take 2
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 28 Aug 2023 10:31:24 +0000 (12:31 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 28 Aug 2023 10:31:24 +0000 (12:31 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
tests/utils.test.js

index 18f266e2c2e8712483ec3946065c40e0cb3cfc28..0fc6dc8ac968ba885eb44186f91377b2126d7964 100644 (file)
@@ -49,7 +49,7 @@ describe('Utils test suite', () => {
     const start = performance.now()
     await sleep(1000)
     const elapsed = performance.now() - start
-    expect(elapsed).toBeGreaterThanOrEqual(999.9)
+    expect(elapsed).toBeGreaterThanOrEqual(999)
   })
 
   it('Verify exponentialDelay() behavior', () => {