summaryrefslogtreecommitdiff
path: root/packages/core/src/ide/ide-client.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/core/src/ide/ide-client.test.ts')
-rw-r--r--packages/core/src/ide/ide-client.test.ts14
1 files changed, 12 insertions, 2 deletions
diff --git a/packages/core/src/ide/ide-client.test.ts b/packages/core/src/ide/ide-client.test.ts
index 6955e495..f061156d 100644
--- a/packages/core/src/ide/ide-client.test.ts
+++ b/packages/core/src/ide/ide-client.test.ts
@@ -5,6 +5,7 @@
*/
import { describe, it, expect } from 'vitest';
+import * as path from 'path';
import { IdeClient } from './ide-client.js';
describe('IdeClient.validateWorkspacePath', () => {
@@ -49,7 +50,7 @@ describe('IdeClient.validateWorkspacePath', () => {
it('should handle multiple workspace paths and return valid', () => {
const result = IdeClient.validateWorkspacePath(
- '/some/other/path:/Users/person/gemini-cli',
+ ['/some/other/path', '/Users/person/gemini-cli'].join(path.delimiter),
'VS Code',
'/Users/person/gemini-cli/sub-dir',
);
@@ -58,11 +59,20 @@ describe('IdeClient.validateWorkspacePath', () => {
it('should return invalid if cwd is not in any of the multiple workspace paths', () => {
const result = IdeClient.validateWorkspacePath(
- '/some/other/path:/another/path',
+ ['/some/other/path', '/another/path'].join(path.delimiter),
'VS Code',
'/Users/person/gemini-cli/sub-dir',
);
expect(result.isValid).toBe(false);
expect(result.error).toContain('Directory mismatch');
});
+
+ it.skipIf(process.platform !== 'win32')('should handle windows paths', () => {
+ const result = IdeClient.validateWorkspacePath(
+ 'c:/some/other/path;d:/Users/person/gemini-cli',
+ 'VS Code',
+ 'd:/Users/person/gemini-cli/sub-dir',
+ );
+ expect(result.isValid).toBe(true);
+ });
});