From 58a71ab7d20725a614cefdab2fe02dfa885e7933 Mon Sep 17 00:00:00 2001 From: Roman Date: Fri, 8 Dec 2023 20:47:59 +0100 Subject: [PATCH] fix tests --- test/RateLimiterQueue.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/RateLimiterQueue.test.js b/test/RateLimiterQueue.test.js index 47e2670..d0785c7 100644 --- a/test/RateLimiterQueue.test.js +++ b/test/RateLimiterQueue.test.js @@ -49,7 +49,7 @@ describe('RateLimiterQueue with FIFO queue', function RateLimiterQueueTest() { rlQueue.removeTokens(1) .then((remainingTokens) => { expect(remainingTokens).to.equal(0); - expect(Date.now() - startTime >= 1000).to.equal(true); + expect(Date.now() - startTime >= 999).to.equal(true); done(); }); }); @@ -85,7 +85,7 @@ describe('RateLimiterQueue with FIFO queue', function RateLimiterQueueTest() { rlQueue.removeTokens(1).then(() => { rlQueue.removeTokens(1).then((remainingTokens) => { expect(remainingTokens).to.equal(0); - expect(Date.now() - time >= 1000).to.equal(true); + expect(Date.now() - time >= 999).to.equal(true); done(); }); });