mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 01:07:46 +00:00
move errorParsing.ts to core (#6159)
This commit is contained in:
@@ -51,6 +51,7 @@ const MockedGeminiClientClass = vi.hoisted(() =>
|
||||
const MockedUserPromptEvent = vi.hoisted(() =>
|
||||
vi.fn().mockImplementation(() => {}),
|
||||
);
|
||||
const mockParseAndFormatApiError = vi.hoisted(() => vi.fn());
|
||||
|
||||
vi.mock('@google/gemini-cli-core', async (importOriginal) => {
|
||||
const actualCoreModule = (await importOriginal()) as any;
|
||||
@@ -59,6 +60,7 @@ vi.mock('@google/gemini-cli-core', async (importOriginal) => {
|
||||
GitService: vi.fn(),
|
||||
GeminiClient: MockedGeminiClientClass,
|
||||
UserPromptEvent: MockedUserPromptEvent,
|
||||
parseAndFormatApiError: mockParseAndFormatApiError,
|
||||
};
|
||||
});
|
||||
|
||||
@@ -127,11 +129,6 @@ vi.mock('./slashCommandProcessor.js', () => ({
|
||||
handleSlashCommand: vi.fn().mockReturnValue(false),
|
||||
}));
|
||||
|
||||
const mockParseAndFormatApiError = vi.hoisted(() => vi.fn());
|
||||
vi.mock('../utils/errorParsing.js', () => ({
|
||||
parseAndFormatApiError: mockParseAndFormatApiError,
|
||||
}));
|
||||
|
||||
// --- END MOCKS ---
|
||||
|
||||
describe('mergePartListUnions', () => {
|
||||
|
||||
Reference in New Issue
Block a user