// @vitest-environment node
import { describe, it, expect } from 'vitest';
import { transformKeys } from './config.js';

describe('a2a.limits transform', () => {
  it('maps all six snake_case keys to camelCase', () => {
    const out = transformKeys({
      a2a: {
        limits: {
          rate_per_minute: 42,
          max_concurrent_tasks: 3,
          max_payload_bytes: 1024,
          max_stream_seconds: 120,
          skill_budget_per_hour: 50,
          max_concurrent_resubscribe: 4,
        },
      },
    }) as any;
    expect(out.a2a.limits.ratePerMinute).toBe(42);
    expect(out.a2a.limits.maxConcurrentTasks).toBe(3);
    expect(out.a2a.limits.maxPayloadBytes).toBe(1024);
    expect(out.a2a.limits.maxStreamSeconds).toBe(120);
    expect(out.a2a.limits.skillBudgetPerHour).toBe(50);
    expect(out.a2a.limits.maxConcurrentResubscribe).toBe(4);
  });
});
