From 9758c620b678dd3e514a733f2a674c8f72a8579a Mon Sep 17 00:00:00 2001 From: Claude Fable 5 Date: Sat, 4 Jul 2026 08:44:24 -0700 Subject: [PATCH] test(agent-orchestrator): use vitest mock for available agents provider --- .../__tests__/unit/available-agents.test.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/plugins/plugin-agent-orchestrator/__tests__/unit/available-agents.test.ts b/plugins/plugin-agent-orchestrator/__tests__/unit/available-agents.test.ts index 6f403edf2af75..93a712813b31f 100644 --- a/plugins/plugin-agent-orchestrator/__tests__/unit/available-agents.test.ts +++ b/plugins/plugin-agent-orchestrator/__tests__/unit/available-agents.test.ts @@ -2,18 +2,15 @@ * Verifies availableAgentsProvider. * Deterministic unit test of pure helpers; no runtime, no live model. */ -import { mock } from "bun:test"; import { describe, expect, it, vi } from "vitest"; // Control the framework-state probe so we can drive its failure path // deterministically without touching the filesystem / env discovery it does. const getTaskAgentFrameworkStateMock = vi.fn(); -mock.module("../../src/services/task-agent-frameworks.js", () => { - return { - getTaskAgentFrameworkState: (...args: unknown[]) => - getTaskAgentFrameworkStateMock(...args), - }; -}); +vi.mock("../../src/services/task-agent-frameworks.js", () => ({ + getTaskAgentFrameworkState: (...args: unknown[]) => + getTaskAgentFrameworkStateMock(...args), +})); import { memory,