summaryrefslogtreecommitdiff
path: root/packages/cli/src/services/CommandService.test.ts
diff options
context:
space:
mode:
authorHarold Mciver <[email protected]>2025-07-16 22:40:56 -0400
committerGitHub <[email protected]>2025-07-17 02:40:56 +0000
commit9ab44ea9d675cd9d560e22fba50d057f1764f25c (patch)
tree492c12bd893fe0249545a2b4b16a86b11ca86fd1 /packages/cli/src/services/CommandService.test.ts
parent01e66bb12392c3e8cd0222dc495c8dc61ebe4fba (diff)
updated `/quit` to use new slash command arch (#4259)
Co-authored-by: Abhi <[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 8f5b1421..084f603b 100644
--- a/packages/cli/src/services/CommandService.test.ts
+++ b/packages/cli/src/services/CommandService.test.ts
@@ -25,6 +25,7 @@ import { compressCommand } from '../ui/commands/compressCommand.js';
import { mcpCommand } from '../ui/commands/mcpCommand.js';
import { editorCommand } from '../ui/commands/editorCommand.js';
import { bugCommand } from '../ui/commands/bugCommand.js';
+import { quitCommand } from '../ui/commands/quitCommand.js';
// Mock the command modules to isolate the service from the command implementations.
vi.mock('../ui/commands/memoryCommand.js', () => ({
@@ -75,9 +76,12 @@ vi.mock('../ui/commands/editorCommand.js', () => ({
vi.mock('../ui/commands/bugCommand.js', () => ({
bugCommand: { name: 'bug', description: 'Mock Bug' },
}));
+vi.mock('../ui/commands/quitCommand.js', () => ({
+ quitCommand: { name: 'quit', description: 'Mock Quit' },
+}));
describe('CommandService', () => {
- const subCommandLen = 16;
+ const subCommandLen = 17;
let mockConfig: Mocked<Config>;
beforeEach(() => {
@@ -144,6 +148,7 @@ describe('CommandService', () => {
const commandNames = tree.map((cmd) => cmd.name);
expect(commandNames).toContain('ide');
expect(commandNames).toContain('editor');
+ expect(commandNames).toContain('quit');
});
it('should overwrite any existing commands when called again', async () => {
@@ -183,6 +188,7 @@ describe('CommandService', () => {
mcpCommand,
memoryCommand,
privacyCommand,
+ quitCommand,
statsCommand,
themeCommand,
toolsCommand,