From 8136679b1cc10ea24d5a535594cda18a53044781 Mon Sep 17 00:00:00 2001 From: MoerAI Date: Fri, 27 Mar 2026 11:53:54 +0900 Subject: [PATCH] test: update test to expect mutual exclusion error for category+subagent_type --- src/tools/delegate-task/tools.test.ts | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/tools/delegate-task/tools.test.ts b/src/tools/delegate-task/tools.test.ts index 550e87b78..b56096493 100644 --- a/src/tools/delegate-task/tools.test.ts +++ b/src/tools/delegate-task/tools.test.ts @@ -465,7 +465,7 @@ describe("sisyphus-task", () => { expect(args.subagent_type).toBe("Sisyphus-Junior") }, { timeout: 10000 }) - test("category overrides subagent_type and still maps to sisyphus-junior", async () => { + test("rejects when both category and subagent_type are provided", async () => { //#given const { createDelegateTask } = require("./tools") @@ -507,14 +507,7 @@ describe("sisyphus-task", () => { abort: new AbortController().signal, } - const args: { - description: string - prompt: string - category: string - subagent_type: string - run_in_background: boolean - load_skills: string[] - } = { + const args = { description: "Override test", prompt: "Do something", category: "quick", @@ -523,12 +516,8 @@ describe("sisyphus-task", () => { load_skills: [], } - //#when - const result = await tool.execute(args, toolContext) - - //#then - expect(args.subagent_type).toBe("Sisyphus-Junior") - expect(result).toContain("Background task launched") + //#when + #then + await expect(tool.execute(args, toolContext)).rejects.toThrow("mutually exclusive") }, { timeout: 10000 }) test("proceeds without error when systemDefaultModel is undefined", async () => {