mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 12:40:42 +00:00
test: mock tts in system prompt wrappers
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { buildCliAgentSystemPrompt } from "./helpers.js";
|
||||
|
||||
vi.mock("../../tts/tts.js", () => ({
|
||||
buildTtsSystemPromptHint: vi.fn(() => undefined),
|
||||
}));
|
||||
|
||||
describe("buildCliAgentSystemPrompt", () => {
|
||||
it("uses config-backed sub-agent delegation mode", () => {
|
||||
const prompt = buildCliAgentSystemPrompt({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AgentSession } from "@mariozechner/pi-coding-agent";
|
||||
import { afterEach, describe, expect, it } from "vitest";
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import { clearMemoryPluginState, registerMemoryPromptSection } from "../../plugins/memory-state.js";
|
||||
import {
|
||||
applySystemPromptOverrideToSession,
|
||||
@@ -7,6 +7,10 @@ import {
|
||||
createSystemPromptOverride,
|
||||
} from "./system-prompt.js";
|
||||
|
||||
vi.mock("../../tts/tts.js", () => ({
|
||||
buildTtsSystemPromptHint: vi.fn(() => undefined),
|
||||
}));
|
||||
|
||||
type MutableSession = {
|
||||
_baseSystemPrompt?: string;
|
||||
_rebuildSystemPrompt?: (toolNames: string[]) => string;
|
||||
|
||||
Reference in New Issue
Block a user