mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-31 08:20:54 -07:00
feat(core): Add support for listing experiments (#12495)
This commit is contained in:
@@ -252,4 +252,30 @@ describe('CodeAssistServer', () => {
|
||||
currentTier: { id: UserTierId.STANDARD },
|
||||
});
|
||||
});
|
||||
|
||||
it('should call the listExperiments endpoint with metadata', async () => {
|
||||
const client = new OAuth2Client();
|
||||
const server = new CodeAssistServer(
|
||||
client,
|
||||
'test-project',
|
||||
{},
|
||||
'test-session',
|
||||
UserTierId.FREE,
|
||||
);
|
||||
const mockResponse = {
|
||||
experiments: [],
|
||||
};
|
||||
vi.spyOn(server, 'requestPost').mockResolvedValue(mockResponse);
|
||||
|
||||
const metadata = {
|
||||
ide_version: 'v0.1.0',
|
||||
};
|
||||
const response = await server.listExperiments(metadata);
|
||||
|
||||
expect(server.requestPost).toHaveBeenCalledWith('listExperiments', {
|
||||
project: 'test-project',
|
||||
metadata: { ide_version: 'v0.1.0', duet_project: 'test-project' },
|
||||
});
|
||||
expect(response).toEqual(mockResponse);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user