From 69b06d787c958f73fc03e5c6faa2397a46f21716 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Mon, 23 Mar 2026 03:05:50 +0000 Subject: [PATCH] fix: update built-in-commands tests to include plugin command --- .../command/__tests__/built-in-commands.spec.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/services/command/__tests__/built-in-commands.spec.ts b/src/services/command/__tests__/built-in-commands.spec.ts index ecb2bdb0fb8..3d96e870030 100644 --- a/src/services/command/__tests__/built-in-commands.spec.ts +++ b/src/services/command/__tests__/built-in-commands.spec.ts @@ -5,8 +5,8 @@ describe("Built-in Commands", () => { it("should return all built-in commands", async () => { const commands = await getBuiltInCommands() - expect(commands).toHaveLength(1) - expect(commands.map((cmd) => cmd.name)).toEqual(expect.arrayContaining(["init"])) + expect(commands).toHaveLength(2) + expect(commands.map((cmd) => cmd.name)).toEqual(expect.arrayContaining(["init", "plugin"])) // Verify all commands have required properties commands.forEach((command) => { @@ -31,6 +31,12 @@ describe("Built-in Commands", () => { expect(initCommand!.description).toBe( "Analyze codebase and create concise AGENTS.md files for AI assistants", ) + + const pluginCommand = commands.find((cmd) => cmd.name === "plugin") + expect(pluginCommand).toBeDefined() + expect(pluginCommand!.content).toContain("plugin.json") + expect(pluginCommand!.content).toContain("PluginManager") + expect(pluginCommand!.description).toBe("Install, remove, or list plugins from GitHub repositories") }) }) @@ -63,10 +69,10 @@ describe("Built-in Commands", () => { it("should return all built-in command names", async () => { const names = await getBuiltInCommandNames() - expect(names).toHaveLength(1) - expect(names).toEqual(expect.arrayContaining(["init"])) + expect(names).toHaveLength(2) + expect(names).toEqual(expect.arrayContaining(["init", "plugin"])) // Order doesn't matter since it's based on filesystem order - expect(names.sort()).toEqual(["init"]) + expect(names.sort()).toEqual(["init", "plugin"]) }) it("should return array of strings", async () => {