import { AgentcRAG } from '../agentcRAG';
import { RSSFeedConfig } from '../rss/rssFetcher';

describe('AgentcRAG', () => {
  const rssFeeds: RSSFeedConfig[] = [
    { url: 'https://example.com/rss', interval: '* * * * *' },
  ];
  const summarizer = { apiKey: 'test-key' };
  const rag = new AgentcRAG({ rssFeeds, summarizer, logLevel: 'error' });

  it('should instantiate and provide expandQuery API', () => {
    const result = rag.expandQuery('What is AI?');
    expect(result).toHaveProperty('type');
    expect(result).toHaveProperty('expanded');
    expect(result).toHaveProperty('reformulated');
  });

  it('should store feedback', () => {
    rag.feedback('AI?', 'AI 자세히 설명', true, 'Good');
    expect(rag.getFeedbacks().length).toBeGreaterThan(0);
  });

  // runPipeline은 외부 API/mock 필요로 별도 통합테스트에서 검증
});
