Changing ratelimit

This commit is contained in:
2026-07-21 15:51:16 -05:00
parent a1f2f13b1d
commit 571f3e9fd8
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ describe('rate limiter', () => {
expect(limiter.check('ip').allowed).toBe(false);
time = 1_001;
expect(limiter.check('ip').allowed).toBe(true);
limiter.recordCost('ip', 10);
limiter.recordCost('ip', 15);
expect(limiter.check('ip').allowed).toBe(false);
time = 5 * 60 * 60 * 1_000 + 1_002;
expect(limiter.check('ip').allowed).toBe(true);