// {{ display_name }} MCP server — generated by mcpify. Do not hand-edit.

import { describe, expect, it } from 'vitest';

import { ApiKeyStrategy } from '../../../src/auth/strategies/api-key.js';

describe('ApiKeyStrategy', () => {
  it('stores the provided apiKey', async () => {
    const strategy = new ApiKeyStrategy();
    const credentials = await strategy.authenticate({ apiKey: 'xyz' });
    expect(credentials.apiKey).toBe('xyz');
  });

  it('throws when apiKey is missing', async () => {
    const strategy = new ApiKeyStrategy();
    await expect(strategy.authenticate({})).rejects.toThrow();
  });
});
