X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Futils.test.js;h=42a0668ab3c19d55080682f39e3ecfbb78df5090;hb=c0c98c4c07a95dae4c040922f2ade3cc48218e4b;hp=c00f0307d45b257da730c3cb55f72ba96f15789c;hpb=98446b391031d7add0e0d7f7e310e25a014370e2;p=poolifier.git diff --git a/tests/utils.test.js b/tests/utils.test.js index c00f0307..42a0668a 100644 --- a/tests/utils.test.js +++ b/tests/utils.test.js @@ -27,10 +27,10 @@ describe('Utils test suite', () => { }) it('Verify sleep() behavior', async () => { - const now = performance.now() + const start = performance.now() await sleep(1000) - const elapsed = performance.now() - now - expect(elapsed).toBeGreaterThanOrEqual(1000) + const stop = performance.now() + expect(stop - start).toBeGreaterThanOrEqual(1000) }) it('Verify exponentialDelay() behavior', () => {