0
This commit is contained in:
Nicolas 2024-05-30 15:07:49 -07:00
parent 6ceb7ff50a
commit 6860ace4af
2 changed files with 2 additions and 1 deletions

View File

@ -1004,7 +1004,7 @@ describe("E2E Tests for API Routes", () => {
describe("Rate Limiter", () => {
it("should return 429 when rate limit is exceeded for preview token", async () => {
for (let i = 0; i < 5; i++) {
for (let i = 0; i < 4; i++) {
const response = await request(TEST_URL)
.post("/v0/scrape")
.set("Authorization", `Bearer this_is_just_a_preview_token`)

View File

@ -57,6 +57,7 @@ export function getRateLimiter(mode: RateLimiterMode, token: string, plan?: stri
if (token.includes("5089cefa58") || token.includes("6254cf9")) {
return testSuiteRateLimiter;
}
const rateLimitConfig = RATE_LIMITS[mode];
if (!rateLimitConfig) return serverRateLimiter;