summaryrefslogtreecommitdiff
path: root/packages/core/src/ide/ide-installer.test.ts
diff options
context:
space:
mode:
authorShreya Keshive <[email protected]>2025-08-04 17:06:17 -0400
committerGitHub <[email protected]>2025-08-04 21:06:17 +0000
commit2180dd13dc580db4cef77b39aa69eaa8017530ea (patch)
tree5d645188636eff4f6807a722be8aaf91cadb4400 /packages/core/src/ide/ide-installer.test.ts
parent11808ef7ed3735b848ed23ef8b3eb0f8cdb95775 (diff)
Improve user-facing error messages for IDE mode (#5522)
Diffstat (limited to 'packages/core/src/ide/ide-installer.test.ts')
-rw-r--r--packages/core/src/ide/ide-installer.test.ts30
1 files changed, 1 insertions, 29 deletions
diff --git a/packages/core/src/ide/ide-installer.test.ts b/packages/core/src/ide/ide-installer.test.ts
index 83459d6b..698c3173 100644
--- a/packages/core/src/ide/ide-installer.test.ts
+++ b/packages/core/src/ide/ide-installer.test.ts
@@ -45,32 +45,6 @@ describe('ide-installer', () => {
vi.restoreAllMocks();
});
- describe('isInstalled', () => {
- it('should return true if command is in PATH', async () => {
- expect(await installer.isInstalled()).toBe(true);
- });
-
- it('should return true if command is in a known location', async () => {
- vi.spyOn(child_process, 'execSync').mockImplementation(() => {
- throw new Error('Command not found');
- });
- vi.spyOn(fs, 'existsSync').mockReturnValue(true);
- // Re-create the installer so it re-runs findVsCodeCommand
- installer = getIdeInstaller(DetectedIde.VSCode)!;
- expect(await installer.isInstalled()).toBe(true);
- });
-
- it('should return false if command is not found', async () => {
- vi.spyOn(child_process, 'execSync').mockImplementation(() => {
- throw new Error('Command not found');
- });
- vi.spyOn(fs, 'existsSync').mockReturnValue(false);
- // Re-create the installer so it re-runs findVsCodeCommand
- installer = getIdeInstaller(DetectedIde.VSCode)!;
- expect(await installer.isInstalled()).toBe(false);
- });
- });
-
describe('install', () => {
it('should return a failure message if VS Code is not installed', async () => {
vi.spyOn(child_process, 'execSync').mockImplementation(() => {
@@ -81,9 +55,7 @@ describe('ide-installer', () => {
installer = getIdeInstaller(DetectedIde.VSCode)!;
const result = await installer.install();
expect(result.success).toBe(false);
- expect(result.message).toContain(
- 'not found in your PATH or common installation locations',
- );
+ expect(result.message).toContain('VS Code CLI not found');
});
});
});