test: tighten bundle mcp assertions · openclaw/openclaw@1c951e0
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -322,8 +322,13 @@ describe("session MCP runtime", () => {
|
322 | 322 | ); |
323 | 323 | |
324 | 324 | expect(runtimeA).not.toBe(runtimeB); |
325 | | -expect(resultA.content[0]).toMatchObject({ type: "text", text: "FROM-CONFIG-A" }); |
326 | | -expect(resultB.content[0]).toMatchObject({ type: "text", text: "FROM-CONFIG-B" }); |
| 325 | +const contentA = resultA.content[0]; |
| 326 | +const contentB = resultB.content[0]; |
| 327 | +if (contentA?.type !== "text" || contentB?.type !== "text") { |
| 328 | +throw new Error("Expected configured bundle MCP probe calls to return text content"); |
| 329 | +} |
| 330 | +expect(contentA.text).toBe("FROM-CONFIG-A"); |
| 331 | +expect(contentB.text).toBe("FROM-CONFIG-B"); |
327 | 332 | }); |
328 | 333 | |
329 | 334 | it("disposes catalog startup in-flight without leaving cached runtimes", async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。