mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
migrate compress command (#4271)
This commit is contained in:
@@ -16,6 +16,7 @@ import { themeCommand } from '../ui/commands/themeCommand.js';
|
||||
import { statsCommand } from '../ui/commands/statsCommand.js';
|
||||
import { privacyCommand } from '../ui/commands/privacyCommand.js';
|
||||
import { aboutCommand } from '../ui/commands/aboutCommand.js';
|
||||
import { compressCommand } from '../ui/commands/compressCommand.js';
|
||||
import { extensionsCommand } from '../ui/commands/extensionsCommand.js';
|
||||
|
||||
// Mock the command modules to isolate the service from the command implementations.
|
||||
@@ -43,12 +44,15 @@ vi.mock('../ui/commands/statsCommand.js', () => ({
|
||||
vi.mock('../ui/commands/aboutCommand.js', () => ({
|
||||
aboutCommand: { name: 'about', description: 'Mock About' },
|
||||
}));
|
||||
vi.mock('../ui/commands/compressCommand.js', () => ({
|
||||
compressCommand: { name: 'compress', description: 'Mock Compress' },
|
||||
}));
|
||||
vi.mock('../ui/commands/extensionsCommand.js', () => ({
|
||||
extensionsCommand: { name: 'extensions', description: 'Mock Extensions' },
|
||||
}));
|
||||
|
||||
describe('CommandService', () => {
|
||||
const subCommandLen = 10;
|
||||
const subCommandLen = 11;
|
||||
|
||||
describe('when using default production loader', () => {
|
||||
let commandService: CommandService;
|
||||
@@ -85,6 +89,7 @@ describe('CommandService', () => {
|
||||
expect(commandNames).toContain('stats');
|
||||
expect(commandNames).toContain('privacy');
|
||||
expect(commandNames).toContain('about');
|
||||
expect(commandNames).toContain('compress');
|
||||
expect(commandNames).toContain('extensions');
|
||||
});
|
||||
|
||||
@@ -116,6 +121,7 @@ describe('CommandService', () => {
|
||||
authCommand,
|
||||
chatCommand,
|
||||
clearCommand,
|
||||
compressCommand,
|
||||
extensionsCommand,
|
||||
helpCommand,
|
||||
memoryCommand,
|
||||
|
||||
Reference in New Issue
Block a user