Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

676 B
Raw Blame
import { DEFAULT_LOOKUP_CONCURRENCY, getLookupConcurrency } from './concurrency';

describe('getLookupConcurrency', () => {
  it('falls back to the default for each key', () => {
    expect(getLookupConcurrency(undefined, 'mcpCatalogLookups')).toBe(
      DEFAULT_LOOKUP_CONCURRENCY.mcpCatalogLookups,
    );
    expect(getLookupConcurrency({ concurrency: { skillNameLookups: 2 } }, 'resumeAgentLoads')).toBe(
      DEFAULT_LOOKUP_CONCURRENCY.resumeAgentLoads,
    );
  });

  it('uses the configured value, including 1 for serial lookups', () => {
    expect(getLookupConcurrency({ concurrency: { skillNameLookups: 1 } }, 'skillNameLookups')).toBe(
      1,
    );
  });
});