fix: update ide-client tests to match new config file naming scheme

- Update config file naming from qwen-code-ide-server-{pid}-{timestamp}.json to qwen-code-ide-server-{port}.json
- Add readdir mock to return config file list
- Add validateWorkspacePath mock for workspace validation
- Add workspacePath field to all config objects in tests
- Remove getIdeProcessInfo dependency from tests
- All 23 tests now passing
This commit is contained in:
xuewenjie
2025-12-19 11:36:05 +08:00
parent c2b59038ae
commit ec32a24508
4 changed files with 99 additions and 283 deletions

View File

@@ -52,7 +52,7 @@ export function detectIdeFromEnv(): IdeInfo {
function verifyVSCode(
ide: IdeInfo,
ideProcessInfo: {
ideProcessInfo?: {
pid: number;
command: string;
},
@@ -61,7 +61,7 @@ function verifyVSCode(
return ide;
}
if (
ideProcessInfo.command &&
ideProcessInfo?.command &&
ideProcessInfo.command.toLowerCase().includes('code')
) {
return IDE_DEFINITIONS.vscode;
@@ -70,7 +70,7 @@ function verifyVSCode(
}
export function detectIde(
ideProcessInfo: {
ideProcessInfo?: {
pid: number;
command: string;
},