test: add missing fake agent controller

This commit is contained in:
Nicolas Meienberger 2026-05-09 11:46:57 +02:00
parent e4499c395f
commit 9bd6dd90dc
No known key found for this signature in database

View file

@ -1,6 +1,7 @@
import { EventEmitter } from "node:events"; import { EventEmitter } from "node:events";
import { PassThrough } from "node:stream"; import { PassThrough } from "node:stream";
import { afterEach, beforeEach, expect, test, vi } from "vitest"; import { afterEach, beforeEach, expect, test, vi } from "vitest";
import { fromAny } from "@total-typescript/shoehorn";
import type { ProcessWithAgentRuntime } from "../helpers/runtime-state.dev"; import type { ProcessWithAgentRuntime } from "../helpers/runtime-state.dev";
const spawnMock = vi.fn(); const spawnMock = vi.fn();
@ -16,7 +17,7 @@ const processWithAgentRuntime = process as ProcessWithAgentRuntime;
const setAgentRuntime = () => { const setAgentRuntime = () => {
processWithAgentRuntime.__zerobyteAgentRuntime = { processWithAgentRuntime.__zerobyteAgentRuntime = {
agentManager: null, agentManager: fromAny({ waitForAgentReady: vi.fn(async () => true) }),
localAgent: null, localAgent: null,
isStoppingLocalAgent: false, isStoppingLocalAgent: false,
localAgentRestartTimeout: null, localAgentRestartTimeout: null,