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(); }); });