summaryrefslogtreecommitdiff
path: root/packages/cli/src/services/CommandService.test.ts
diff options
context:
space:
mode:
authorDevansh Sharma <[email protected]>2025-07-20 20:57:41 +0200
committerGitHub <[email protected]>2025-07-20 18:57:41 +0000
commit8f85ac7de027326c0440cc21122d6439687fab44 (patch)
tree10d98a1659313f66670e904915e8fa2c81a83cf0 /packages/cli/src/services/CommandService.test.ts
parenta01b1219a3e814c370f6827b81c9118f2cbc7a64 (diff)
feat: Added /copy command for copying output to clipboard with new Command Service approach (#3706)
Co-authored-by: Abhi <[email protected]> Co-authored-by: N. Taylor Mullen <[email protected]>
Diffstat (limited to 'packages/cli/src/services/CommandService.test.ts')
-rw-r--r--packages/cli/src/services/CommandService.test.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/cli/src/services/CommandService.test.ts b/packages/cli/src/services/CommandService.test.ts
index d03bf988..de4ff2ea 100644
--- a/packages/cli/src/services/CommandService.test.ts
+++ b/packages/cli/src/services/CommandService.test.ts
@@ -11,6 +11,7 @@ import { type SlashCommand } from '../ui/commands/types.js';
import { memoryCommand } from '../ui/commands/memoryCommand.js';
import { helpCommand } from '../ui/commands/helpCommand.js';
import { clearCommand } from '../ui/commands/clearCommand.js';
+import { copyCommand } from '../ui/commands/copyCommand.js';
import { corgiCommand } from '../ui/commands/corgiCommand.js';
import { docsCommand } from '../ui/commands/docsCommand.js';
import { chatCommand } from '../ui/commands/chatCommand.js';
@@ -51,6 +52,9 @@ vi.mock('../ui/commands/authCommand.js', () => ({
vi.mock('../ui/commands/themeCommand.js', () => ({
themeCommand: { name: 'theme', description: 'Mock Theme' },
}));
+vi.mock('../ui/commands/copyCommand.js', () => ({
+ copyCommand: { name: 'copy', description: 'Mock Copy' },
+}));
vi.mock('../ui/commands/privacyCommand.js', () => ({
privacyCommand: { name: 'privacy', description: 'Mock Privacy' },
}));
@@ -89,7 +93,7 @@ vi.mock('../ui/commands/restoreCommand.js', () => ({
}));
describe('CommandService', () => {
- const subCommandLen = 18;
+ const subCommandLen = 19;
let mockConfig: Mocked<Config>;
beforeEach(() => {
@@ -132,6 +136,7 @@ describe('CommandService', () => {
expect(commandNames).toContain('memory');
expect(commandNames).toContain('help');
expect(commandNames).toContain('clear');
+ expect(commandNames).toContain('copy');
expect(commandNames).toContain('compress');
expect(commandNames).toContain('corgi');
expect(commandNames).toContain('docs');
@@ -205,6 +210,7 @@ describe('CommandService', () => {
bugCommand,
chatCommand,
clearCommand,
+ copyCommand,
compressCommand,
corgiCommand,
docsCommand,