import { describe, it, expect } from 'vitest';
import { mergeMcpConfig, MCP_DEFAULTS } from './config.js';

describe('mergeMcpConfig', () => {
  it('returns defaults when partial is undefined', () => {
    expect(mergeMcpConfig(undefined)).toEqual(MCP_DEFAULTS);
  });
  it('overrides specified keys only', () => {
    const merged = mergeMcpConfig({ callTimeoutSeconds: 120 });
    expect(merged.callTimeoutSeconds).toBe(120);
    expect(merged.maxBinarySizeMb).toBe(MCP_DEFAULTS.maxBinarySizeMb);
  });
});
