mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-26 04:54:25 -07:00
Harded code assist converter. (#18656)
This commit is contained in:
@@ -331,6 +331,16 @@ describe('converter', () => {
|
||||
const genaiRes = fromGenerateContentResponse(codeAssistRes);
|
||||
expect(genaiRes.responseId).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should handle missing response property gracefully', () => {
|
||||
const invalidRes = {
|
||||
traceId: 'some-trace-id',
|
||||
} as unknown as CaGenerateContentResponse;
|
||||
|
||||
const genaiRes = fromGenerateContentResponse(invalidRes);
|
||||
expect(genaiRes.responseId).toEqual('some-trace-id');
|
||||
expect(genaiRes.candidates).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('toContents', () => {
|
||||
|
||||
Reference in New Issue
Block a user