test: tighten qqbot outbound assertions · openclaw/openclaw@5a9e8a2
shakkernerd
·
2026-05-11
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -179,11 +179,9 @@ describe("dispatchOutbound", () => {
|
179 | 179 | { runtime, cfg: {}, account }, |
180 | 180 | ); |
181 | 181 | |
182 | | -expect(finalized).toMatchObject({ |
183 | | -MediaType: "audio/wav", |
184 | | -MediaTypes: ["audio/wav"], |
185 | | -QQVoiceAttachmentPaths: ["/tmp/qqbot/voice.wav"], |
186 | | -}); |
| 182 | +expect(finalized?.MediaType).toBe("audio/wav"); |
| 183 | +expect(finalized?.MediaTypes).toEqual(["audio/wav"]); |
| 184 | +expect(finalized?.QQVoiceAttachmentPaths).toEqual(["/tmp/qqbot/voice.wav"]); |
187 | 185 | expect(finalized).not.toHaveProperty("MediaPath"); |
188 | 186 | expect(finalized).not.toHaveProperty("MediaPaths"); |
189 | 187 | }); |
@@ -237,13 +235,11 @@ describe("dispatchOutbound", () => {
|
237 | 235 | { runtime, cfg: { commands: { text: true } }, account }, |
238 | 236 | ); |
239 | 237 | |
240 | | -expect(finalized).toMatchObject({ |
241 | | -CommandBody: "/models", |
242 | | -CommandAuthorized: true, |
243 | | -CommandSource: "text", |
244 | | -Provider: "qqbot", |
245 | | -Surface: "qqbot", |
246 | | -ChatType: "direct", |
247 | | -}); |
| 238 | +expect(finalized?.CommandBody).toBe("/models"); |
| 239 | +expect(finalized?.CommandAuthorized).toBe(true); |
| 240 | +expect(finalized?.CommandSource).toBe("text"); |
| 241 | +expect(finalized?.Provider).toBe("qqbot"); |
| 242 | +expect(finalized?.Surface).toBe("qqbot"); |
| 243 | +expect(finalized?.ChatType).toBe("direct"); |
248 | 244 | }); |
249 | 245 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。