Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
test(mcp): exercise flooring with a non-default fractional limit
Yudhi Armyndharisd5d13833dd1a
diff --git a/src/modules/mcp/mcp-rate-limit.spec.ts b/src/modules/mcp/mcp-rate-limit.spec.tsindex 4cc9d18bb..284a65231 100644--- a/src/modules/mcp/mcp-rate-limit.spec.ts+++ b/src/modules/mcp/mcp-rate-limit.spec.ts@@ -52,8 +52,8 @@ describe('readRateLimitConfig', () => {expect(readRateLimitConfig({ MCP_RATE_LIMIT_MAX: '1.9' }).max).toBe(1);});- it('floors 60.7 to 60 (valid positive integer)', () => {- expect(readRateLimitConfig({ MCP_RATE_LIMIT_MAX: '60' }).max).toBe(60);+ it('floors 70.7 to 70 (valid positive integer)', () => {+ expect(readRateLimitConfig({ MCP_RATE_LIMIT_MAX: '70.7' }).max).toBe(70);});it('falls back to default for MCP_RATE_LIMIT_WINDOW_MS 0.5', () => {