X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fpools%2Fthread%2Ffixed.test.js;h=cf5c3175df42d9a5c94732e46d440af5a8f5deb1;hb=50e66724ecb17b83dfb87b1128ca9674f9b14e03;hp=a42b5d37ede902bd5c6a490ce7ff832e6025d1fc;hpb=aee467366d8c393b79e7af82c6a7ab12338ee64e;p=poolifier.git diff --git a/tests/pools/thread/fixed.test.js b/tests/pools/thread/fixed.test.js index a42b5d37..cf5c3175 100644 --- a/tests/pools/thread/fixed.test.js +++ b/tests/pools/thread/fixed.test.js @@ -119,9 +119,9 @@ describe('Fixed thread pool test suite', () => { it('Verify that async function is working properly', async () => { const data = { f: 10 } - const startTime = Date.now() + const startTime = performance.now() const result = await asyncPool.execute(data) - const usedTime = Date.now() - startTime + const usedTime = performance.now() - startTime expect(result).toStrictEqual(data) expect(usedTime).toBeGreaterThanOrEqual(2000) })