diff options
| author | christine betts <[email protected]> | 2025-08-12 20:08:47 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-12 20:08:47 +0000 |
| commit | 74fd0841d0d7148127e586fce4c550a01ff40e90 (patch) | |
| tree | 5c23d673ab220029c4111d30952ea35e21b4a317 /packages/core/src/ide/ide-installer.test.ts | |
| parent | 8524cce7b9b31e852b2bbb4d5bf9a4843beec2b1 (diff) | |
[ide-mode] Update installation logic and nudge (#6068)
Diffstat (limited to 'packages/core/src/ide/ide-installer.test.ts')
| -rw-r--r-- | packages/core/src/ide/ide-installer.test.ts | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/packages/core/src/ide/ide-installer.test.ts b/packages/core/src/ide/ide-installer.test.ts index 1afd7a36..e43e1b34 100644 --- a/packages/core/src/ide/ide-installer.test.ts +++ b/packages/core/src/ide/ide-installer.test.ts @@ -23,19 +23,6 @@ describe('ide-installer', () => { // A more specific check might be needed if we export the class expect(installer).toBeInstanceOf(Object); }); - - it('should return an OpenVSXInstaller for "vscodium"', () => { - const installer = getIdeInstaller(DetectedIde.VSCodium); - expect(installer).not.toBeNull(); - expect(installer).toBeInstanceOf(Object); - }); - - it('should return a DefaultIDEInstaller for an unknown IDE', () => { - const installer = getIdeInstaller('unknown' as DetectedIde); - // Assuming DefaultIDEInstaller is the fallback - expect(installer).not.toBeNull(); - expect(installer).toBeInstanceOf(Object); - }); }); describe('VsCodeInstaller', () => { @@ -67,44 +54,4 @@ describe('ide-installer', () => { }); }); }); - - describe('OpenVSXInstaller', () => { - let installer: IdeInstaller; - - beforeEach(() => { - installer = getIdeInstaller(DetectedIde.VSCodium)!; - }); - - afterEach(() => { - vi.restoreAllMocks(); - }); - - describe('install', () => { - it('should call execSync with the correct command and return success', async () => { - const execSyncSpy = vi - .spyOn(child_process, 'execSync') - .mockImplementation(() => ''); - const result = await installer.install(); - expect(execSyncSpy).toHaveBeenCalledWith( - 'npx ovsx get google.gemini-cli-vscode-ide-companion', - { stdio: 'pipe' }, - ); - expect(result.success).toBe(true); - expect(result.message).toContain( - 'VS Code companion extension was installed successfully from OpenVSX', - ); - }); - - it('should return a failure message on failed installation', async () => { - vi.spyOn(child_process, 'execSync').mockImplementation(() => { - throw new Error('Command failed'); - }); - const result = await installer.install(); - expect(result.success).toBe(false); - expect(result.message).toContain( - 'Failed to install VS Code companion extension from OpenVSX', - ); - }); - }); - }); }); |
