Files
openclaw/test/helpers/agents/llm-stream-simple-mock.ts
2026-06-04 20:42:26 -04:00

17 lines
484 B
TypeScript

// Simple LLM stream mock helper builds deterministic streamed responses.
import { vi } from "vitest";
type LlmMockModule = Record<string, unknown>;
export function createLlmStreamSimpleMock(): LlmMockModule {
return {
streamSimple: vi.fn(() => ({
push: vi.fn(),
result: vi.fn(async () => undefined),
[Symbol.asyncIterator]: vi.fn(async function* () {
// Minimal async stream shape for wrappers that patch iteration/result.
}),
})),
};
}