mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 12:40:44 +00:00
refactor: update test structure and clean up unused code in cli and sdk
This commit is contained in:
parent
ad9ba914e1
commit
ac6aecb622
14 changed files with 2620 additions and 401 deletions
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue