mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-21 02:24:09 -07:00
Remove org/repo install support (#7815)
This commit is contained in:
@@ -5,9 +5,8 @@
|
||||
*/
|
||||
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { installCommand, handleInstall } from './install.js';
|
||||
import { installCommand } from './install.js';
|
||||
import yargs from 'yargs';
|
||||
import * as extension from '../../config/extension.js';
|
||||
|
||||
vi.mock('../../config/extension.js', () => ({
|
||||
installExtension: vi.fn(),
|
||||
@@ -28,22 +27,3 @@ describe('extensions install command', () => {
|
||||
).toThrow('Arguments source and path are mutually exclusive');
|
||||
});
|
||||
});
|
||||
|
||||
describe('extensions install with org/repo', () => {
|
||||
it('should call installExtension with the correct git URL', async () => {
|
||||
const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {});
|
||||
const installExtensionSpy = vi
|
||||
.spyOn(extension, 'installExtension')
|
||||
.mockResolvedValue('test-extension');
|
||||
|
||||
await handleInstall({ source: 'test-org/test-repo' });
|
||||
|
||||
expect(installExtensionSpy).toHaveBeenCalledWith({
|
||||
source: 'https://github.com/test-org/test-repo.git',
|
||||
type: 'git',
|
||||
});
|
||||
expect(consoleLogSpy).toHaveBeenCalledWith(
|
||||
'Extension "test-extension" installed successfully and enabled.',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user