test: tighten effective tool policy assertions · openclaw/openclaw@a99729f
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
File tree
src/agents/pi-embedded-runner
| Original file line number | Diff line number | Diff line change |
|---|
@@ -126,9 +126,7 @@ describe("applyFinalEffectiveToolPolicy", () => {
|
126 | 126 | warn: (message) => warnings.push(message), |
127 | 127 | }); |
128 | 128 | |
129 | | -expect(warnings).not.toEqual( |
130 | | -expect.arrayContaining([expect.stringContaining("unknown entries")]), |
131 | | -); |
| 129 | +expect(warnings.filter((message) => message.includes("unknown entries"))).toStrictEqual([]); |
132 | 130 | }); |
133 | 131 | |
134 | 132 | it("still warns on genuinely unknown entries in the bundled pass", () => { |
@@ -139,9 +137,7 @@ describe("applyFinalEffectiveToolPolicy", () => {
|
139 | 137 | warn: (message) => warnings.push(message), |
140 | 138 | }); |
141 | 139 | |
142 | | -expect(warnings).toEqual( |
143 | | -expect.arrayContaining([expect.stringContaining("totally-made-up-tool")]), |
144 | | -); |
| 140 | +expect(warnings.filter((message) => message.includes("totally-made-up-tool"))).toHaveLength(1); |
145 | 141 | }); |
146 | 142 | |
147 | 143 | it("keeps bundle MCP tools in the coding profile via plugin metadata", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。