mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-14 05:42:54 -07:00
test(core): verify warning log in content-utils fallback test
This commit is contained in:
@@ -192,11 +192,16 @@ describe('contentPartsToGeminiParts', () => {
|
||||
const content = [
|
||||
{ type: 'custom_widget', payload: 123 },
|
||||
] as unknown as ContentPart[];
|
||||
const warnSpy = vi.spyOn(debugLogger, 'warn');
|
||||
const result = contentPartsToGeminiParts(content);
|
||||
|
||||
expect(warnSpy).toHaveBeenCalled();
|
||||
expect(result).toHaveLength(1);
|
||||
expect(result[0]).toEqual({
|
||||
text: JSON.stringify({ type: 'custom_widget', payload: 123 }),
|
||||
});
|
||||
|
||||
warnSpy.mockRestore();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user