mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
refactor: update test structure and clean up unused code in cli and sdk
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -11,7 +11,6 @@ import {
|
||||
parseExecutableSpec,
|
||||
prepareSpawnInfo,
|
||||
findNativeCliPath,
|
||||
resolveCliPath,
|
||||
} from '../../src/utils/cliPath.js';
|
||||
|
||||
// Mock fs module
|
||||
@@ -421,28 +420,6 @@ describe('CLI Path Utilities', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('resolveCliPath (backward compatibility)', () => {
|
||||
it('should resolve CLI path for backward compatibility', () => {
|
||||
mockFs.existsSync.mockReturnValue(true);
|
||||
|
||||
const result = resolveCliPath('/path/to/qwen');
|
||||
|
||||
expect(result).toBe('/path/to/qwen');
|
||||
});
|
||||
|
||||
it('should auto-detect when no path provided', () => {
|
||||
const originalEnv = process.env['QWEN_CODE_CLI_PATH'];
|
||||
process.env['QWEN_CODE_CLI_PATH'] = '/usr/local/bin/qwen';
|
||||
mockFs.existsSync.mockReturnValue(true);
|
||||
|
||||
const result = resolveCliPath();
|
||||
|
||||
expect(result).toBe('/usr/local/bin/qwen');
|
||||
|
||||
process.env['QWEN_CODE_CLI_PATH'] = originalEnv;
|
||||
});
|
||||
});
|
||||
|
||||
describe('real-world use cases', () => {
|
||||
beforeEach(() => {
|
||||
mockFs.existsSync.mockReturnValue(true);
|
||||
|
||||
Reference in New Issue
Block a user