Skip to content

Commit f13ef9c

Browse files
committed
added a comment to tests
1 parent 4f77bb1 commit f13ef9c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/rateLimiters/tokenBucket.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const user4 = '4';
1717

1818
async function getBucketFromClient(redisClient: RedisType, uuid: string): Promise<RedisBucket> {
1919
const res = await redisClient.get(uuid);
20+
// if no uuid is found, return -1 for tokens and timestamp, which are both impossible
2021
if (res === null) return { tokens: -1, timestamp: -1 };
2122
return JSON.parse(res);
2223
}

0 commit comments

Comments
 (0)