fix: test ci

This commit is contained in:
pomelo-nwu
2025-07-25 13:32:57 +08:00
parent eacb464a5b
commit 2b1e4c995e
4 changed files with 1345 additions and 1331 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -33,6 +33,9 @@ describe('OpenAIContentGenerator Timeout Handling', () => {
// Reset mocks
vi.clearAllMocks();
// Mock environment variables
vi.stubEnv('OPENAI_BASE_URL', '');
// Mock config
mockConfig = {
getContentGeneratorConfig: vi.fn().mockReturnValue({
@@ -55,7 +58,7 @@ describe('OpenAIContentGenerator Timeout Handling', () => {
vi.mocked(OpenAI).mockImplementation(() => mockOpenAIClient);
// Create generator instance
generator = new OpenAIContentGenerator('test-api-key', 'gpt-4', mockConfig);
generator = new OpenAIContentGenerator('test-key', 'gpt-4', mockConfig);
});
afterEach(() => {

View File

@@ -198,6 +198,7 @@ describe('Gemini Client (client.ts)', () => {
getQuotaErrorOccurred: vi.fn().mockReturnValue(false),
setQuotaErrorOccurred: vi.fn(),
getNoBrowser: vi.fn().mockReturnValue(false),
getSystemPromptMappings: vi.fn().mockReturnValue(undefined),
};
return mock as unknown as Config;
});