adds eslint

This commit is contained in:
geoffsee
2025-06-24 17:29:52 -04:00
committed by Geoff Seemueller
parent 9698fc6f3b
commit 02c3253343
169 changed files with 4896 additions and 4804 deletions

View File

@@ -1,6 +1,11 @@
import { describe, it, expect, vi } from 'vitest';
import { BaseChatProvider, CommonProviderParams, ChatStreamProvider } from '../chat-stream-provider.ts';
import { OpenAI } from 'openai';
import { describe, it, expect, vi } from 'vitest';
import {
BaseChatProvider,
CommonProviderParams,
ChatStreamProvider,
} from '../chat-stream-provider.ts';
// Create a concrete implementation of BaseChatProvider for testing
class TestChatProvider extends BaseChatProvider {
@@ -29,16 +34,16 @@ vi.mock('../../lib/chat-sdk', () => ({
buildAssistantPrompt: vi.fn().mockReturnValue('Assistant prompt'),
buildMessageChain: vi.fn().mockReturnValue([
{ role: 'system', content: 'System prompt' },
{ role: 'user', content: 'User message' }
])
}
{ role: 'user', content: 'User message' },
]),
},
}));
describe('ChatStreamProvider', () => {
it('should define the required interface', () => {
// Verify the interface has the required method
const mockProvider: ChatStreamProvider = {
handleStream: vi.fn()
handleStream: vi.fn(),
};
expect(mockProvider.handleStream).toBeDefined();