test: tighten pi tools fs helper assertions · openclaw/openclaw@b6067fd
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -16,7 +16,10 @@ function expectTool<T extends { name: string }>(tools: T[], name: string): T {
|
16 | 16 | } |
17 | 17 | |
18 | 18 | export function expectReadWriteEditTools<T extends { name: string }>(tools: T[]) { |
19 | | -expect(tools.map((tool) => tool.name)).toEqual(expect.arrayContaining(["read", "write", "edit"])); |
| 19 | +const names = tools.map((tool) => tool.name); |
| 20 | +expect(names).toContain("read"); |
| 21 | +expect(names).toContain("write"); |
| 22 | +expect(names).toContain("edit"); |
20 | 23 | return { |
21 | 24 | readTool: expectTool(tools, "read"), |
22 | 25 | writeTool: expectTool(tools, "write"), |
@@ -25,7 +28,9 @@ export function expectReadWriteEditTools<T extends { name: string }>(tools: T[])
|
25 | 28 | } |
26 | 29 | |
27 | 30 | export function expectReadWriteTools<T extends { name: string }>(tools: T[]) { |
28 | | -expect(tools.map((tool) => tool.name)).toEqual(expect.arrayContaining(["read", "write"])); |
| 31 | +const names = tools.map((tool) => tool.name); |
| 32 | +expect(names).toContain("read"); |
| 33 | +expect(names).toContain("write"); |
29 | 34 | return { |
30 | 35 | readTool: expectTool(tools, "read"), |
31 | 36 | writeTool: expectTool(tools, "write"), |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。