test: require media config fixture · openclaw/openclaw@e875ba9
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -104,6 +104,13 @@ function createAudioConfigWithEcho(opts?: {
|
104 | 104 | return { cfg, providers }; |
105 | 105 | } |
106 | 106 | |
| 107 | +function disableImageUnderstanding(cfg: OpenClawConfig): void { |
| 108 | +if (!cfg.tools?.media) { |
| 109 | +throw new Error("Expected media tool config"); |
| 110 | +} |
| 111 | +cfg.tools.media.image = { enabled: false }; |
| 112 | +} |
| 113 | + |
107 | 114 | function expectSingleEchoDeliveryCall() { |
108 | 115 | expect(mockDeliverOutboundPayloads).toHaveBeenCalledOnce(); |
109 | 116 | const callArgs = mockDeliverOutboundPayloads.mock.calls[0]?.[0]; |
@@ -292,7 +299,7 @@ describe("applyMediaUnderstanding – echo transcript", () => {
|
292 | 299 | echoTranscript: true, |
293 | 300 | transcribedText: "should not appear", |
294 | 301 | }); |
295 | | -cfg.tools!.media!.image = { enabled: false }; |
| 302 | +disableImageUnderstanding(cfg); |
296 | 303 | |
297 | 304 | await applyMediaUnderstanding({ ctx, cfg, providers }); |
298 | 305 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。