test: isolate system prompt config assertions · openclaw/openclaw@7aa6b47
shakkernerd
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -import { describe, expect, it } from "vitest"; |
| 1 | +import { describe, expect, it, vi } from "vitest"; |
2 | 2 | import type { OpenClawConfig } from "../config/types.openclaw.js"; |
3 | 3 | import { |
4 | 4 | buildConfiguredAgentSystemPrompt, |
5 | 5 | resolveAgentSystemPromptConfig, |
6 | 6 | } from "./system-prompt-config.js"; |
7 | 7 | |
| 8 | +vi.mock("../tts/tts.js", () => ({ |
| 9 | +buildTtsSystemPromptHint: vi.fn(() => undefined), |
| 10 | +})); |
| 11 | + |
8 | 12 | describe("resolveAgentSystemPromptConfig", () => { |
9 | 13 | it("defaults sub-agent delegation mode to suggest", () => { |
10 | 14 | expect(resolveAgentSystemPromptConfig({ config: {} }).subagentDelegationMode).toBe("suggest"); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。