mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 03:30:40 +00:00
test(cli): cover acp slash command allowlist
This commit is contained in:
parent
3b08491e46
commit
3209274ab6
1 changed files with 10 additions and 1 deletions
|
|
@ -5,7 +5,10 @@
|
|||
*/
|
||||
|
||||
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
||||
import { handleSlashCommand } from './nonInteractiveCliCommands.js';
|
||||
import {
|
||||
ALLOWED_BUILTIN_COMMANDS_ACP,
|
||||
handleSlashCommand,
|
||||
} from './nonInteractiveCliCommands.js';
|
||||
import type { Config } from '@qwen-code/qwen-code-core';
|
||||
import type { LoadedSettings } from './config/settings.js';
|
||||
import { CommandKind } from './ui/commands/types.js';
|
||||
|
|
@ -60,6 +63,12 @@ describe('handleSlashCommand', () => {
|
|||
expect(result.type).toBe('no_command');
|
||||
});
|
||||
|
||||
it('should keep the ACP allowlist commands needed by VSCode companion', () => {
|
||||
expect(ALLOWED_BUILTIN_COMMANDS_ACP).toEqual(
|
||||
expect.arrayContaining(['bug', 'compress', 'summary', 'insight']),
|
||||
);
|
||||
});
|
||||
|
||||
it('should return no_command for unknown slash commands', async () => {
|
||||
mockGetCommands.mockReturnValue([]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue