Nick:
This commit is contained in:
parent
6ceb7ff50a
commit
6860ace4af
@ -1004,7 +1004,7 @@ describe("E2E Tests for API Routes", () => {
|
|||||||
|
|
||||||
describe("Rate Limiter", () => {
|
describe("Rate Limiter", () => {
|
||||||
it("should return 429 when rate limit is exceeded for preview token", async () => {
|
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)
|
const response = await request(TEST_URL)
|
||||||
.post("/v0/scrape")
|
.post("/v0/scrape")
|
||||||
.set("Authorization", `Bearer this_is_just_a_preview_token`)
|
.set("Authorization", `Bearer this_is_just_a_preview_token`)
|
||||||
|
@ -58,6 +58,7 @@ export function getRateLimiter(mode: RateLimiterMode, token: string, plan?: stri
|
|||||||
return testSuiteRateLimiter;
|
return testSuiteRateLimiter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const rateLimitConfig = RATE_LIMITS[mode];
|
const rateLimitConfig = RATE_LIMITS[mode];
|
||||||
if (!rateLimitConfig) return serverRateLimiter;
|
if (!rateLimitConfig) return serverRateLimiter;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user