Skip to content

Commit 5f69d87

Browse files
committed
futher separate token bucket tests.
1 parent cd0f1c1 commit 5f69d87

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/rateLimiters/tokenBucket.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,10 @@ xdescribe('Test TokenBucket Rate Limiter', () => {
7979
expect((await limiter.processRequest(user2, timestamp, initial)).tokens).toBe(0);
8080
const tokenCountPartialToEmpty = await getBucketFromClient(client, user2);
8181
expect(tokenCountPartialToEmpty).toBe(0);
82+
});
8283

83-
// Bucket initially empty but enough time elapsed to paritally fill bucket since last request
84+
// Bucket initially empty but enough time elapsed to paritally fill bucket since last request
85+
test('bucket is initially empty but enough time has elapsed to partially fill the bucket', async () => {
8486
await setTokenCountInClient(client, user4, 0, timestamp);
8587
expect((await limiter.processRequest(user4, timestamp + 6000, 4)).tokens).toBe(2);
8688
const count = await getBucketFromClient(client, user4);

0 commit comments

Comments
 (0)